O'Reilly logo

Robot Operating System Cookbook by Kumar Bipin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Getting useful information from motion planning

Through code, we can also get some valuable data that we may require for our code. Let's see some examples.

We can get the reference frame for a certain group by executing this line:

print "Reference frame: %s" % group.get_planning_frame() 

We can get the end-effector link for a certain group by executing this line:

print "End effector: %s" % group.get_end_effector_link() 

We can get a list with all of the groups of the robot, like this:

print "Robot Groups:" 
print robot.get_group_names() 

We can get the current values of the joints, like this:

print "Current Joint Values:" 
print group.get_current_joint_values() 

We can also get the current pose of the end-effector of the robot, like this:

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required