Reference for inverse kinematics formula: A Mathematical Introduction to Robotic Manipulation.
This package simulates the inverse kinematics of a planar 2-link robot arm whose end-effector has to trace a circle of desired time period.
The urdf/2linkrobot.urdf file defines the model of the 2-link robot as per the following tree:
- base
- arm1
- arm2
- endEffector
- arm2
- arm1
The launch file display.launch starts up all the nodes for this simulation and sets up the relevant parameters.
Nodes:
controller_node: Publishes joint states theta1 and theta2 for the two continuous joints, as computed from the inverse kinematics formulasjoint_state_publisher: Use in conjunction with gui when debugging and verifying the robot urdf. Also publishes joint states theta1 and theta2, but from the gui.robot_state_publisher: Takes joint states from either of the above two nodes and broadcasts transforms between the frames of the robot.tf_endEffector_node: Publishes the transform from base to end-effector, to be used by rviz for animating the trajectory.rviz: Opens the robot visualizer rviz.
Parameters:
robot_description: Parses and stores the robot's urdf in the parameter serveruse_gui: "true" if you want to use the slider gui for testing the joint angles, "false" (default) if you want to use the controller_node instead. Associated substitution arg: guicontroller_pub_rate:controller_node's private parameter for specifying the frequency (Hz) at which the desired joint states are to be published. Associated substitution arg: js_pub_rateperiod:controller_node's private parameter for specifying the time period for tracing the circle. Associated substitution arg: circle_period
Important topics:
/joint_states: Messages of type sensor_msgs/JointState are published to this topic by either thecontroller_nodeor thejoint_state_publisher, and is subscribed by therobot_state_publisher. Contains the angles of the continuous joints./visualization_marker: Messages of type visualization_msgs/Marker are published to this topic by thetf_endEffector_node, and is subscribed byrviz. Contains the marker data for animation./tf: Messages of type tf2_msgs/TFMessage are published to this topic by therobot_state_publisher, and is subscribed byrvizandtf_endEffector_node. Contains tf data of the robot model as it moves.
