Contents
Package Description
baxter_sim_hardware
This package controls the functionalities of the simulator and acts as an interface between the user and the simulator.
This package has one node
- /baxter_emulator
- This node subscribes to the topics
robot/set_super_enable
,robot/set_super_stop
,robot/set_super_reset
and enables/disables the controllers accordingly. - It also subscribes to the laser messages, wraps and publishes them as IR range and Sonar point cloud messages, accordingly.
- It activates the head_nod state upon its command and toggles it in 1 second. Also it monitors the change in head_pan and publishes if the head is panning.
- The digital_io light states are published based on the command received.
- Upon gazebo startup, this node reads the RSDK image and loads it on Baxter's display.
- This node also invokes the gravity calculation function at the arm_kinematics library (Package: baxter_sim_kinematics) to calculate the gravity comp torques at 100 Hz.
- Once this node has completely finished loading, it will publish a latched
std_msgs/Empty
message to/robot/sim/started
to alert all nodes that the robot will now function
- This node subscribes to the topics
baxter_sim_io
This package is responsible for the qt plugin that constitute the Naviagtor of the simulator.
It has a UI file in which holds the QT buttons for the navigator. This package also listens to the qt events and records the data
This has one node
- /baxter_sim_io
- This node is responsible for publishing the variables which are updated based on the users input.
baxter_sim_kinematics
This package caluculates the IK, FK and Gravity Compensation torques.
It has two nodes, one for each limb
- /baxter_sim_kinematics_left
- This node holds the service call for the IK for the left arm. It unwraps the message and adds a seed to it before calling the IK function from the arm_kinematics library.
- It calculates the endpoint state of the left arm joints (FK) at 100 HZ by subscribing to the
robot/joint_states
topic.
- /baxter_sim_kinematics_right
- This node holds the service call for the IK for the right arm. It unwraps the message and adds a seed to it before calling the IK function from the arm_kinematics library.
- It calculates the endpoint state of the right arm joints (FK) at 100 HZ by subscribing to the
robot/joint_states
topic.
This package has a library
- arm_kinematics
- This library calcualtes the IK, FK for both the left and right arm.
- The gravity compensation is calculated here and the resulting joint torques are shared (via ROS Service call
gazebo/set_link_properties
with Gazebo). These commands are then writing the torque commands to the simulator.
baxter_sim_controllers
This package constitutes the controller plugins for Baxter. It is also responsible for loading the controller information into the parameter server which is then used by gazebo. This has four plugins
- baxter_effort_controller
- This plugin instantiates a publisher for each of the individual joint effort controllers in an arm.
- It unwraps the Joint command message and passes them to the appropriate controller which is then forwarded to the ros control(joint_effort_controller) and written as torque commands to gazebo
- baxter_position_controller
- This plugin instantiates a publisher for each of the individual joint position controllers in an arm.
- It unwraps the Joint command message and passes them to the appropriate controller which is then forwarded to the ros controllers(joint_position_controller) where pid control is implemented before they are converted as torque commands and passed to gazebo.
- baxter_velocity_controller
- This plugin instantiates a publisher for each of the individual joint velocity controllers in an arm.
- It unwraps the Joint command message and passes them to the appropriate controller which is then forwarded to the ros controllers(joint_velocity_controller) where pid control is implemented before they are converted as torque commands and passed to gazebo.
- baxter_head_controller
- This plugin instantiates a publisher for the head joint position controller.
- It unwraps the Joint command message and passes them to the head joint position controller which is then forwarded to the ros controllers(joint_position_controller) where pid control is implemented before they are converted as torque commands and passed to gazebo.
- baxter_gripper_controller
- This plugin instantiates a publisher for the electric gripper joint position controller.
- One of these controllers is instantiated for each of left and right electric grippers if you do not set
<side>_electric_gripper:=false
in thebaxter_gazebo/launch/baxter_world.launch
ROS launch file. "true" is set by default.
baxter_gazebo
This package holds the world models that can be loaded into gazebo. It also contains a controller plugin that regulates the messages passed between controllers. The default gazebo control plugin is overloaded as,
- baxter_gazebo_ros_control_plugin
- This plugin subscribes to the
robot/state
topic on initialization and checks if the state is enabled/disabled, based on which it starts/stops the controllers. - It also switches the controllers based on the mode, received in the joint command, and passes the messages to those controllers.
- This plugin subscribes to the
baxter_sim_examples
FIXME: This package holds the world models that can be loaded into gazebo. It also contains a controller plugin that regulates the messages passed between controllers. The default gazebo control plugin is overloaded as,
- baxter_gazebo_ros_control_plugin
- This plugin subscribes to the
robot/state
topic on initialization and checks if the state is enabled/disabled, based on which it starts/stops the controllers. - It also switches the controllers based on the mode, received in the joint command, and passes the messages to those controllers.
- This plugin subscribes to the
Program Flow
System Architecture
Processes
Process 1
This process is responsible for passing the user commands to the appropriate joints in the various modes.
The steps involved are,
- The baxter_emulator node waits for the enable command from the user/programs and updates the
robot/state
topic accordingly. - The baxter_gazebo_ros_control plugin waits for the enable command to start the head controller, and then switches the appropriate controller (position, velocity or effort) based on the mode from the JointCommand message. At any point of time, if the topic
robot/state
receives disable command, it stops all the controllers. - At baxter_sim_controllers package, the controller which was switched would read the JointCommand message and unwrap the message before passing them to the individual joint controllers.
- The individual joint_controllers at the ros_controller would implement a PID control (no PID control for effort controllers) on the messages and would convert them as torque commands.
- The torque commands to the individual joints are written to a shared location at ros_control.
- The default_robot_hw_sim reads the torque commands from the shared memory and sums them with the gravity compesnation torquees before it passes them to the appropriate joints in gazebo.
Process 2
This process is responsible for the gravity compensation torques' calculation.
The steps involved are,
- The baxter_emulator node calls the gravity_compensation function at 100 Hz and passes the current
robot/joint_states
message. - The arm_kinematics library calculates the gravity compensation torques for the current state of the robot using KDL. It shares the gravity compensation torques with Gazebo in a by ROS Service call
gazebo_msgs/SetLinkProperties.srv
.This updates the gravity compensation torques as 0 when the robot is in disabled state. - Gazebo sums the gravity compensation torques with the torques from the controllers and passes them to the appropriate joints in simulation.
Process 1 and Process 2 share the gravity compensation torques.
Process 3
This process calculates the Forward Kinematics (endpoint state) and Inverse Kinematics for the simulated Baxter.
The steps involved are,
- The baxter emulator creates two nodes named as baxter_sim_kinematics_left and baxter_sim_kinematics_right, for each of the arm. It passes the joint states at 100 Hz.
- The kinematics nodes are subscribed to the
robot/joint_states
and they calculate the endpoint state by using the KDL function defined in the arm_kinematics library. The endpoint state is published at 100 Hz to the topicrobot/limb/<side>/endpoint_state
. - In addition the nodes also define the IK service. They unwrap the service requests and appends the seed (current joint state) to them before calling the KDL function from the arm_kinematics library.
Ros Nodes
- /baxter_emulator
- /baxter_sim_io
- /baxter_sim_kinematics_left
- /baxter_sim_kinematics_right
- /gazebo
- /gazebo_client
- /robot/controller_spawner
- /robot/controller_spawner_stopped
- /robot/left_gripper_controller_spawner_stopped
- /robot/right_gripper_controller_spawner_stopped
- /robot_state_publisher
- /rosout
Ros Topics
- /cameras/head_camera/camera_info
- /cameras/head_camera/image
- /cameras/head_camera/image/compressed
- /cameras/head_camera/image/compressed/parameter_descriptions
- /cameras/head_camera/image/compressed/parameter_updates
- /cameras/head_camera/image/compressedDepth
- /cameras/head_camera/image/compressedDepth/parameter_descriptions
- /cameras/head_camera/image/compressedDepth/parameter_updates
- /cameras/head_camera/image/theora
- /cameras/head_camera/image/theora/parameter_descriptions
- /cameras/head_camera/image/theora/parameter_updates
- /cameras/head_camera/parameter_descriptions
- /cameras/head_camera/parameter_updates
- /cameras/left_hand_camera/camera_info
- /cameras/left_hand_camera/image
- /cameras/left_hand_camera/image/compressed
- /cameras/left_hand_camera/image/compressed/parameter_descriptions
- /cameras/left_hand_camera/image/compressed/parameter_updates
- /cameras/left_hand_camera/image/compressedDepth
- /cameras/left_hand_camera/image/compressedDepth/parameter_descriptions
- /cameras/left_hand_camera/image/compressedDepth/parameter_updates
- /cameras/left_hand_camera/image/theora
- /cameras/left_hand_camera/image/theora/parameter_descriptions
- /cameras/left_hand_camera/image/theora/parameter_updates
- /cameras/left_hand_camera/parameter_descriptions
- /cameras/left_hand_camera/parameter_updates
- /cameras/right_hand_camera/camera_info
- /cameras/right_hand_camera/image
- /cameras/right_hand_camera/image/compressed
- /cameras/right_hand_camera/image/compressed/parameter_descriptions
- /cameras/right_hand_camera/image/compressed/parameter_updates
- /cameras/right_hand_camera/image/compressedDepth
- /cameras/right_hand_camera/image/compressedDepth/parameter_descriptions
- /cameras/right_hand_camera/image/compressedDepth/parameter_updates
- /cameras/right_hand_camera/image/theora
- /cameras/right_hand_camera/image/theora/parameter_descriptions
- /cameras/right_hand_camera/image/theora/parameter_updates
- /cameras/right_hand_camera/parameter_descriptions
- /cameras/right_hand_camera/parameter_updates
- /clock
- /gazebo/link_states
- /gazebo/model_states
- /gazebo/parameter_descriptions
- /gazebo/parameter_updates
- /gazebo/set_link_state
- /gazebo/set_model_state
- /robot/analog_io/left_hand_range/state
- /robot/analog_io/left_hand_range/value_uint32
- /robot/analog_io/right_hand_range/state
- /robot/analog_io/right_hand_range/value_uint32
- /robot/digital_io/command
- /robot/digital_io/left_inner_light/state
- /robot/digital_io/left_lower_button/state
- /robot/digital_io/left_lower_cuff/state
- /robot/digital_io/left_outer_light/state
- /robot/digital_io/left_shoulder_button/state
- /robot/digital_io/left_upper_button/state
- /robot/digital_io/right_inner_light/state
- /robot/digital_io/right_lower_button/state
- /robot/digital_io/right_lower_cuff/state
- /robot/digital_io/right_outer_light/state
- /robot/digital_io/right_shoulder_button/state
- /robot/digital_io/right_upper_button/state
- /robot/digital_io/torso_left_inner_light/state
- /robot/digital_io/torso_left_outer_light/state
- /robot/digital_io/torso_right_inner_light/state
- /robot/digital_io/torso_right_outer_light/state
- /robot/end_effector/left_gripper/command
- /robot/end_effector/left_gripper/properties
- /robot/end_effector/left_gripper/state
- /robot/end_effector/right_gripper/command
- /robot/end_effector/right_gripper/properties
- /robot/end_effector/right_gripper/state
- /robot/head/command_head_nod
- /robot/head/command_head_pan
- /robot/head/head_state
- /robot/head_position_controller/joints/head_controller/command
- /robot/head_position_controller/joints/head_controller/pid/parameter_descriptions
- /robot/head_position_controller/joints/head_controller/pid/parameter_updates
- /robot/head_position_controller/joints/head_controller/state
- /robot/joint_states
- /robot/left_gripper_controller/joints/l_gripper_l_finger_controller/command
- /robot/left_gripper_controller/joints/l_gripper_l_finger_controller/pid/parameter_descriptions
- /robot/left_gripper_controller/joints/l_gripper_l_finger_controller/pid/parameter_updates
- /robot/left_gripper_controller/joints/l_gripper_l_finger_controller/state
- /robot/left_gripper_controller/joints/l_gripper_r_finger_controller/command
- /robot/left_gripper_controller/joints/l_gripper_r_finger_controller/pid/parameter_descriptions
- /robot/left_gripper_controller/joints/l_gripper_r_finger_controller/pid/parameter_updates
- /robot/left_gripper_controller/joints/l_gripper_r_finger_controller/state
- /robot/left_joint_effort_controller/joints/left_e0_controller/command
- /robot/left_joint_effort_controller/joints/left_e1_controller/command
- /robot/left_joint_effort_controller/joints/left_s0_controller/command
- /robot/left_joint_effort_controller/joints/left_s1_controller/command
- /robot/left_joint_effort_controller/joints/left_w0_controller/command
- /robot/left_joint_effort_controller/joints/left_w1_controller/command
- /robot/left_joint_effort_controller/joints/left_w2_controller/command
- /robot/left_joint_position_controller/joints/left_e0_controller/command
- /robot/left_joint_position_controller/joints/left_e0_controller/pid/parameter_descriptions
- /robot/left_joint_position_controller/joints/left_e0_controller/pid/parameter_updates
- /robot/left_joint_position_controller/joints/left_e0_controller/state
- /robot/left_joint_position_controller/joints/left_e1_controller/command
- /robot/left_joint_position_controller/joints/left_e1_controller/pid/parameter_descriptions
- /robot/left_joint_position_controller/joints/left_e1_controller/pid/parameter_updates
- /robot/left_joint_position_controller/joints/left_e1_controller/state
- /robot/left_joint_position_controller/joints/left_s0_controller/command
- /robot/left_joint_position_controller/joints/left_s0_controller/pid/parameter_descriptions
- /robot/left_joint_position_controller/joints/left_s0_controller/pid/parameter_updates
- /robot/left_joint_position_controller/joints/left_s0_controller/state
- /robot/left_joint_position_controller/joints/left_s1_controller/command
- /robot/left_joint_position_controller/joints/left_s1_controller/pid/parameter_descriptions
- /robot/left_joint_position_controller/joints/left_s1_controller/pid/parameter_updates
- /robot/left_joint_position_controller/joints/left_s1_controller/state
- /robot/left_joint_position_controller/joints/left_w0_controller/command
- /robot/left_joint_position_controller/joints/left_w0_controller/pid/parameter_descriptions
- /robot/left_joint_position_controller/joints/left_w0_controller/pid/parameter_updates
- /robot/left_joint_position_controller/joints/left_w0_controller/state
- /robot/left_joint_position_controller/joints/left_w1_controller/command
- /robot/left_joint_position_controller/joints/left_w1_controller/pid/parameter_descriptions
- /robot/left_joint_position_controller/joints/left_w1_controller/pid/parameter_updates
- /robot/left_joint_position_controller/joints/left_w1_controller/state
- /robot/left_joint_position_controller/joints/left_w2_controller/command
- /robot/left_joint_position_controller/joints/left_w2_controller/pid/parameter_descriptions
- /robot/left_joint_position_controller/joints/left_w2_controller/pid/parameter_updates
- /robot/left_joint_position_controller/joints/left_w2_controller/state
- /robot/left_joint_velocity_controller/joints/left_e0_controller/command
- /robot/left_joint_velocity_controller/joints/left_e0_controller/pid/parameter_descriptions
- /robot/left_joint_velocity_controller/joints/left_e0_controller/pid/parameter_updates
- /robot/left_joint_velocity_controller/joints/left_e0_controller/state
- /robot/left_joint_velocity_controller/joints/left_e1_controller/command
- /robot/left_joint_velocity_controller/joints/left_e1_controller/pid/parameter_descriptions
- /robot/left_joint_velocity_controller/joints/left_e1_controller/pid/parameter_updates
- /robot/left_joint_velocity_controller/joints/left_e1_controller/state
- /robot/left_joint_velocity_controller/joints/left_s0_controller/command
- /robot/left_joint_velocity_controller/joints/left_s0_controller/pid/parameter_descriptions
- /robot/left_joint_velocity_controller/joints/left_s0_controller/pid/parameter_updates
- /robot/left_joint_velocity_controller/joints/left_s0_controller/state
- /robot/left_joint_velocity_controller/joints/left_s1_controller/command
- /robot/left_joint_velocity_controller/joints/left_s1_controller/pid/parameter_descriptions
- /robot/left_joint_velocity_controller/joints/left_s1_controller/pid/parameter_updates
- /robot/left_joint_velocity_controller/joints/left_s1_controller/state
- /robot/left_joint_velocity_controller/joints/left_w0_controller/command
- /robot/left_joint_velocity_controller/joints/left_w0_controller/pid/parameter_descriptions
- /robot/left_joint_velocity_controller/joints/left_w0_controller/pid/parameter_updates
- /robot/left_joint_velocity_controller/joints/left_w0_controller/state
- /robot/left_joint_velocity_controller/joints/left_w1_controller/command
- /robot/left_joint_velocity_controller/joints/left_w1_controller/pid/parameter_descriptions
- /robot/left_joint_velocity_controller/joints/left_w1_controller/pid/parameter_updates
- /robot/left_joint_velocity_controller/joints/left_w1_controller/state
- /robot/left_joint_velocity_controller/joints/left_w2_controller/command
- /robot/left_joint_velocity_controller/joints/left_w2_controller/pid/parameter_descriptions
- /robot/left_joint_velocity_controller/joints/left_w2_controller/pid/parameter_updates
- /robot/left_joint_velocity_controller/joints/left_w2_controller/state
- /robot/limb/left/endpoint_state
- /robot/limb/left/gravity_compensation_torques
- /robot/limb/left/joint_command
- /robot/limb/right/endpoint_state
- /robot/limb/right/gravity_compensation_torques
- /robot/limb/right/joint_command
- /robot/navigators/left_navigator/state
- /robot/navigators/right_navigator/state
- /robot/navigators/torso_left_navigator/state
- /robot/navigators/torso_right_navigator/state
- /robot/range/left_hand_range/state
- /robot/range/right_hand_range/state
- /robot/right_gripper_controller/joints/r_gripper_l_finger_controller/command
- /robot/right_gripper_controller/joints/r_gripper_l_finger_controller/pid/parameter_descriptions
- /robot/right_gripper_controller/joints/r_gripper_l_finger_controller/pid/parameter_updates
- /robot/right_gripper_controller/joints/r_gripper_l_finger_controller/state
- /robot/right_gripper_controller/joints/r_gripper_r_finger_controller/command
- /robot/right_gripper_controller/joints/r_gripper_r_finger_controller/pid/parameter_descriptions
- /robot/right_gripper_controller/joints/r_gripper_r_finger_controller/pid/parameter_updates
- /robot/right_gripper_controller/joints/r_gripper_r_finger_controller/state
- /robot/right_joint_effort_controller/joints/right_e0_controller/command
- /robot/right_joint_effort_controller/joints/right_e1_controller/command
- /robot/right_joint_effort_controller/joints/right_s0_controller/command
- /robot/right_joint_effort_controller/joints/right_s1_controller/command
- /robot/right_joint_effort_controller/joints/right_w0_controller/command
- /robot/right_joint_effort_controller/joints/right_w1_controller/command
- /robot/right_joint_effort_controller/joints/right_w2_controller/command
- /robot/right_joint_position_controller/joints/right_e0_controller/command
- /robot/right_joint_position_controller/joints/right_e0_controller/pid/parameter_descriptions
- /robot/right_joint_position_controller/joints/right_e0_controller/pid/parameter_updates
- /robot/right_joint_position_controller/joints/right_e0_controller/state
- /robot/right_joint_position_controller/joints/right_e1_controller/command
- /robot/right_joint_position_controller/joints/right_e1_controller/pid/parameter_descriptions
- /robot/right_joint_position_controller/joints/right_e1_controller/pid/parameter_updates
- /robot/right_joint_position_controller/joints/right_e1_controller/state
- /robot/right_joint_position_controller/joints/right_s0_controller/command
- /robot/right_joint_position_controller/joints/right_s0_controller/pid/parameter_descriptions
- /robot/right_joint_position_controller/joints/right_s0_controller/pid/parameter_updates
- /robot/right_joint_position_controller/joints/right_s0_controller/state
- /robot/right_joint_position_controller/joints/right_s1_controller/command
- /robot/right_joint_position_controller/joints/right_s1_controller/pid/parameter_descriptions
- /robot/right_joint_position_controller/joints/right_s1_controller/pid/parameter_updates
- /robot/right_joint_position_controller/joints/right_s1_controller/state
- /robot/right_joint_position_controller/joints/right_w0_controller/command
- /robot/right_joint_position_controller/joints/right_w0_controller/pid/parameter_descriptions
- /robot/right_joint_position_controller/joints/right_w0_controller/pid/parameter_updates
- /robot/right_joint_position_controller/joints/right_w0_controller/state
- /robot/right_joint_position_controller/joints/right_w1_controller/command
- /robot/right_joint_position_controller/joints/right_w1_controller/pid/parameter_descriptions
- /robot/right_joint_position_controller/joints/right_w1_controller/pid/parameter_updates
- /robot/right_joint_position_controller/joints/right_w1_controller/state
- /robot/right_joint_position_controller/joints/right_w2_controller/command
- /robot/right_joint_position_controller/joints/right_w2_controller/pid/parameter_descriptions
- /robot/right_joint_position_controller/joints/right_w2_controller/pid/parameter_updates
- /robot/right_joint_position_controller/joints/right_w2_controller/state
- /robot/right_joint_velocity_controller/joints/right_e0_controller/command
- /robot/right_joint_velocity_controller/joints/right_e0_controller/pid/parameter_descriptions
- /robot/right_joint_velocity_controller/joints/right_e0_controller/pid/parameter_updates
- /robot/right_joint_velocity_controller/joints/right_e0_controller/state
- /robot/right_joint_velocity_controller/joints/right_e1_controller/command
- /robot/right_joint_velocity_controller/joints/right_e1_controller/pid/parameter_descriptions
- /robot/right_joint_velocity_controller/joints/right_e1_controller/pid/parameter_updates
- /robot/right_joint_velocity_controller/joints/right_e1_controller/state
- /robot/right_joint_velocity_controller/joints/right_s0_controller/command
- /robot/right_joint_velocity_controller/joints/right_s0_controller/pid/parameter_descriptions
- /robot/right_joint_velocity_controller/joints/right_s0_controller/pid/parameter_updates
- /robot/right_joint_velocity_controller/joints/right_s0_controller/state
- /robot/right_joint_velocity_controller/joints/right_s1_controller/command
- /robot/right_joint_velocity_controller/joints/right_s1_controller/pid/parameter_descriptions
- /robot/right_joint_velocity_controller/joints/right_s1_controller/pid/parameter_updates
- /robot/right_joint_velocity_controller/joints/right_s1_controller/state
- /robot/right_joint_velocity_controller/joints/right_w0_controller/command
- /robot/right_joint_velocity_controller/joints/right_w0_controller/pid/parameter_descriptions
- /robot/right_joint_velocity_controller/joints/right_w0_controller/pid/parameter_updates
- /robot/right_joint_velocity_controller/joints/right_w0_controller/state
- /robot/right_joint_velocity_controller/joints/right_w1_controller/command
- /robot/right_joint_velocity_controller/joints/right_w1_controller/pid/parameter_descriptions
- /robot/right_joint_velocity_controller/joints/right_w1_controller/pid/parameter_updates
- /robot/right_joint_velocity_controller/joints/right_w1_controller/state
- /robot/right_joint_velocity_controller/joints/right_w2_controller/command
- /robot/right_joint_velocity_controller/joints/right_w2_controller/pid/parameter_descriptions
- /robot/right_joint_velocity_controller/joints/right_w2_controller/pid/parameter_updates
- /robot/right_joint_velocity_controller/joints/right_w2_controller/state
- /robot/set_super_enable
- /robot/set_super_reset
- /robot/set_super_stop
- /robot/sim/started
- /robot/sonar/head_sonar/state
- /robot/state
- /robot/xdisplay
- /robot/xdisplay/compressed
- /robot/xdisplay/compressed/parameter_descriptions
- /robot/xdisplay/compressed/parameter_updates
- /robot/xdisplay/compressedDepth
- /robot/xdisplay/compressedDepth/parameter_descriptions
- /robot/xdisplay/compressedDepth/parameter_updates
- /robot/xdisplay/theora
- /robot/xdisplay/theora/parameter_descriptions
- /robot/xdisplay/theora/parameter_updates
- /rosout
- /rosout_agg
- /sim/laserscan/left_hand_range/state
- /sim/laserscan/right_hand_range/state
- /tf
- /tf_static