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

Revision history [back]

RViz is just visualizing your robot while Gazebo is a complete simulation environment that simulates a complete robot, including its joints and the motors connected to them.

In case of rviz, running the joint_state_publisher node creates a publisher on the joint_states topic. The joint_state_publisher then subscribes to that topic and publishes the corresponding TF tree.

In gazebo you must not run the joint_state_publisher. Instead, you need to run controller plugin (e.g. the gazebo_ros_controller_manager) that reads the joint states from the simulated robot and publishes them on the joint_states topic. You cannot move the robot by just publishing different joint states since joint states represent the current state of the robot, not a goal. Instead you need to run controllers that apply forces at the simulated joints.

click to hide/show revision 2
No.2 Revision

RViz is just visualizing your robot while Gazebo is a complete simulation environment that simulates a complete robot, including its joints and the motors connected to them.

In case of rviz, running the joint_state_publisher node creates a publisher on the joint_states topic. The joint_state_publisherrobot_state_publisher then subscribes to that topic and publishes the corresponding TF tree.

In gazebo you must not run the joint_state_publisher. Instead, you need to run controller plugin (e.g. the gazebo_ros_controller_manager) that reads the joint states from the simulated robot and publishes them on the joint_states topic. You cannot move the robot by just publishing different joint states since joint states represent the current state of the robot, not a goal. Instead you need to run controllers that apply forces at the simulated joints.