Browse Source

Remove float data type error

galactic
hello-chintan 2 years ago
parent
commit
ddb36c590b
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      stretch_ros_tutorials/avoider.py

+ 1
- 2
stretch_ros_tutorials/avoider.py View File

@ -59,8 +59,7 @@ class Avoider(Node):
# Using hyperbolic tanget for speed regulation, with a threshold to stop
# and driving when it is close to the desired distance.
self.twist.linear.x = tanh(error) if (error > 0.05 or error < -0.05) else 0
self.twist.linear.x = tanh(error) if (error > 0.05 or error < -0.05) else 0.0
# Publish the command using the publisher
self.publisher_.publish(self.twist)

Loading…
Cancel
Save