When I move BB8 and stop it I can see in the simulation window that the robot continues rotating. I send a message with the topic /cmd_vel with the following values:

vel.linear.x = 0.0
vel.linear.y = 0.0
vel.linear.y = 0.0
vel.angular.x = 0.0
vel.angular.y = 0.0
vel.angular.z = 0.0

I have even tried to stop it from the console with the following command without success:

rostopic pub /cmd_vel geometry_msgs/Twist '{linear: {x: 0.0, y: 0.0, z: 0.0}, angular: {x: 0.0,y: 0.0,z: 
0.0}}'

Does anyone know what I'm doing wrong?

Best regards.

asked 06 Mar, 18:28

joseecm%40gmail.com's gravatar image

joseecm@gmai...
192
accept rate: 20%

edited 06 Mar, 18:36


Hello,

First of all, in this unit of the course they explain that even after BB-8 stops moving, there might still be some rotation on the robot, due to inertia.

On the other hand, I don't know how is your complete code but I did this and it works:

while i < request.repetitions:
    # Moving forward
    move_bb8_circle.linear.x = 0.2
    move_bb8_circle.linear.y = 0.0
    move_bb8_circle.angular.z = 0.0
    pub.publish(move_bb8_circle)
    time.sleep(distance)

    # Rotating
    move_bb8_circle.linear.x = 0.0
    move_bb8_circle.linear.y = 0.0
    move_bb8_circle.angular.z = 0.185
    pub.publish(move_bb8_circle)
    time.sleep(4)

    # Stop BB-8
    move_bb8_circle.linear.x = 0.0
    move_bb8_circle.linear.y = 0.0
    move_bb8_circle.angular.z = 0.0
    pub.publish(move_bb8_circle)
    time.sleep(2)

    i+=1

Maybe your problem is that you don't have this comand pub.publish(move_bb8_circle) after the change of the linear.x and angular.z in your code, so that would explain why the robot keeps rotating.

I hope this can help you,

permanent link

answered 14 Mar, 10:47

sanmool%40etsiamn.upv.es's gravatar image

sanmool@etsi...
322
accept rate: 50%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×7

question asked: 06 Mar, 18:28

question was seen: 112 times

last updated: 14 Mar, 10:47

powered by OSQA