Forward and Inverse Kinematics of Baxter Robot
PLEASE ADD 0.01 TO Z COORDINATE BEFORE CALCULATING IK. SEE LINE 25 IN ik_test.py FOR MORE INFO
- Open terminal or press CTRL+ALT+T
- Run following command
sudo apt-get install ros-${ROS_DISTRO}-trac-ik
For example, in the case of ROS Indigo, the following command is equivalent to the one above: sudo apt-get install ros-indigo-trac-ik
-
Install baxter_pykdl package by downloading the package from git into the workspace src folder and runningcatkin_make
. -
Install moveit dependecies:sudo apt-get install ros-indigo-moveit-ros
-
Uncompress the downloaded trac_ik archive from the website -
Copy all four directories trac_ik, trac_ik_example, trac_ik_kinematics_plugin and trac_ik_lib into ros workspace -
Runcatkin_make
command from ros workspace -
If the abpve command shows following error-fatal error: nlopt.hpp: No such file or directory #include <nlopt.hpp>
please runsudo apt-get install libnlopt-dev
-
Run againcatkin_make
command -
Download or clone the repository
-
Go to the ros workspace, i.e.,
cd ros_ws/
-
Run
catkin_make
-
If the abpve command shows following error-
fatal error: learn_kinematics/fast_kinematics_service.h: No such file or directory
, please runcatkin_make
again
These programs use the baxter_pykdl package which requires the robot urdf description to perform IK or FK.
Please connect to Baxter robot or run the baxter simulator for these programs to work properly.
This program listen to rostopic fast_kinematics_listener
for receiving end-effector pose from user. Later on it performs inverse kinematic analysis and publishs the result to another rostopic fast_kinematics_publisher
This is a service implementaion for kinematic analysis. It creates a service fast_kinematics_service
, which perfroms inverse kinematic analysis on request from client.
- First, you need to publish
std_msgs::Float64MultiArray
containing end-effector pose (position in cartesian system and orientaion in quaternion system) to the rostopicfast_kinematics_listener
as input. - Now, run the subscriber and publisher by executing following command
roslaunch learn_kinematics fast_kinematics_pub.launch
- The output joint angles can be seen by following command
rostopic echo fast_kinematics_publisher
You may notice some error initially, as the subscriber haven't receieved any input and publisher starts publishing default values causing this error
- Run the service by following command
roslaunch learn_kinematics fast_kinematics_srv.launch
- Run the service client, which calls
fast_kinematics_service
withlearn_kinematics::fast_kinematics_service
service data type. Currently, it is done in c++ and python in following way - - C++: Run the client by following command
rosrun learn_kinematics fast_kinematics_srv_test
- Python: Run the client by following command
rosrun learn_kinematics fast_kinematics_srv_test.py