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:

print "Current Pose:" 
print group.get_current_pose() 

Finally, we can check the general status of the robot, like this:

print "Robot State:" 
print robot.get_current_state() 

We can create a new file inside the package called get_data.py and add all the new code we've learned previously and check what results we get.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.139.238.76