Assuming your controller YAML file includes a joint_state_controller/JointStateController
plugin, then the joint states should be available over a standard /robot_name/joint_states
topic (carrying a message of type sensor_msgs/JointState
). This combined with a /robot_description
parameter and a robot_state_publisher
node should be all that is required to view the simulated pose of the robot in rviz.
Note that this is covered in detail in the ros_control Gazebo Tutorial. Notice they have they joint_state_controller/JointStateController in the YAML file, they start the robot_state_publisher in the rrbot_control.launch file, and they load the URDF onto the parameter server in the rrbot_world.launch file. Finally, note there is a section called "Connect Rviz to Gazebo Simulation" that details how to setup rviz.