osrf / rosbook

Example code to accompany the book Programming Robots with ROS
Apache License 2.0
477 stars 237 forks source link

CougarBot Gazebo simulation #1

Open SteveMacenski opened 8 years ago

SteveMacenski commented 8 years ago

Hi!

I follow your cougarbot instructions to the t trying to get my robot to simulate. I make it through everything fine, however I cannot get my gazebo simulation to ever not fall over like in Figure18-4. I've modified the urdf file and added the transmissions and gazebo plugin code.

However, I get the following

[WARN] [WallTime: 1452193711.932180] [29.116000] Controller Spawner couldn't find the expected controller_manager ROS interface.

which troubleshooting on answers.ros tell me its a problem with the gazebo plugin/control_manager. I have the gazebo files and gazebo_ros_pkg. Is there something else I need to install for the control plugin to work?

When I run the exact code from this repo I get the previous error as well as

[ WARN] [1452194495.412454939, 0.123000000]: GazeboRosJointStatePublisher Plugin (ns = //) missing , defaults to 100.000000

I am on ROS jade and installed ros_control from source.

Thanks. Steve

Update: When I rostopic list, it does not come up with any of the /arm_controller/... topics but has the rest as listed on page 405.

SteveMacenski commented 8 years ago

Determined the issue. The instructions to not tell you to install ros_control, ros_controllers, gazebo_ros_control, and gazebo_ros_pkgs (though the last comes with desktop-full versions). The author merely hits at the first one.

sudo apt-get install ros-indigo-ros-control ros-indigo-roscontrollers ros-indigo-gazebo-ros-control ros-indigo-gazebo-ros-pkgs

This fixes the above issues. I will now close this issue.

scpeters commented 8 years ago

We could also update the package.xml to properly list the needed dependencies:

SteveMacenski commented 8 years ago

Would be good! I would add this to the books errata, if one exists. This was about a days problem for me to solve.

gerkey commented 8 years ago

We need to fix this, perhaps through a combination of editing the dependencies as @scpeters suggested, but also posting it as an erratum (I'm not sure yet where that ought to go).