ros-simulation / gazebo_ros_demos

Example robots and code for interfacing Gazebo with ROS
347 stars 225 forks source link

The problem about the rviz and gazebo in gazebo_ros_demos package #39

Open CMMMMH opened 3 years ago

CMMMMH commented 3 years ago

I have a problem about the package gazebo_ros_demos.

When I use roslaunch rrbot_description rrbot_rviz.launch then roslaunch rrbot_control rrbot_control.launch, it shows the warn that is [WARN] [1597821207.287022]: Controller Spawner couldn't find the expected controller_manager ROS interface .

When I use roslaunch rrbot_gazebo rrbot_world.launch then roslaunch rrbot_control rrbot_control.launch, it's ok.

And I compare the result of rosservice list , it shows the former one doesn't have controller_manager . That's why ?

gokulmaxi commented 3 years ago

This is due to depreciation of state_publisher. The node name has been changed from state_publisher to robot_state_publisher It is well documented here You have to change your launch file according to this

<!-- Change state_publisher  -->
<!-- <node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher" /> -->
<!-- To robot_state_publisher -->
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" />
gokulmaxi commented 3 years ago

you can view my pull request here