ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

How do I make a robot (Segway RMP) move in gazebo after subscribing to Twist messages? [closed]

asked 2013-02-21 03:31:33 -0500

DevonW gravatar image

updated 2014-07-14 03:15:07 -0500

Hi, I have been attempting for a while now to make a robot move in Gazebo with the PR2 controller plugins. I have noticed in the Pr2 it sends effort to the wheels which makes them spin, but what makes the robot move?

I have applied effort to the joints in the c++ module, however my robot's wheels just spins and it does not move.

Question 1:

How does the Pr2 move its base after receiving a Twist message?

Question 2:

How do I make my robot move, seemingly that applying effort to the wheels is not moving it forward?

Edit: Wow, this was a long time ago and I think I'm experienced enough to answer this for all interested.

To make a robot move, you must send velocity commands to it. There will be controllers loaded in the ROS ecosystem that subscribe to the /cmd_vel topic (sometimes remapped to a different name). These controllers will interpret the message and move the robot.

Upon receiving Twist messages, the controller will handle everything from turning the +X motion into wheel rotation to the error feedback specified by the drivers used in the URDF. The physics of Gazebo will handle the rest.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by DevonW
close date 2014-07-13 03:45:46.053635

Comments

Could you please share the c++ module? I want to rotate a sensor mounted on a quadrotor, which I think will be similar to your spinning the wheel, I am not getting how to do it. Thanks.

Mrit91 gravatar image Mrit91  ( 2013-06-27 09:30:13 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-02-22 02:01:05 -0500

Georg gravatar image

The robot moves if there is some (simulated) force applied onto the ground by the wheels, e.g. you need some friction! You need to set the physical parameters of the wheels and the gound plane in a sort of realistic way.

I would suggest to look at the erratic tutorial as an example of a working simulator. It is comparatively simple compared to the PR2 simulator. The description is a little outdated, be sure to replace the ROS release from diamondback to fuerte where appropriate.

You should look at the source code of the gazebo plugins, the world file and the UDRF of the robot. It will definitely take you some hours and some mor readig on answers.ros.org to dig yourself through all this.

Best,

Georg

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-02-21 03:31:33 -0500

Seen: 2,498 times

Last updated: Jul 14 '14