0
$\begingroup$

Rosanswers logo

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.


Originally posted by DevonW on ROS Answers with karma: 644 on 2013-02-21

Post score: 0


Original comments

Comment by Mrit91 on 2013-06-27:
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.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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


Originally posted by Georg with karma: 328 on 2013-02-22

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.