Robotics StackExchange | Archived questions

FK for arbitrary joint positions in python

Hi,

Sorry in advance for the possibly trivial question - I am new to ROS.

I need to compute FK for an arbitrary joint position via a python script (I have a model for predicting the next action that also depends on the position and orientation of the end-effector). It seems that this functionality is available in cpp: https://groups.google.com/forum/#!topic/moveit-users/HmK0VYzq_uY http://docs.ros.org/kinetic/api/moveit_tutorials/html/doc/pr2_tutorials/kinematics/src/doc/kinematic_model_tutorial.html however I couldn't find the equivalent python code. Any ideas how I may achieve that?

Also, if this functionality is not supported in python, is there a service I could use for arbitrary joint postions?

I am running the WidowX robot, on ROS kinetic on ubuntu 16.04.

Thanks!

Asked by tomjur on 2018-02-24 12:20:10 UTC

Comments

Answers

PyKDL is a Python library that can compute the forward kinematics for a kinematic chain with arbitrary joint position values. There is a nice simple wrapper http://wiki.ros.org/pykdl_utils for easier access to this functionality.

The robot_state_publisher provides a node and a C++ library to do the FK for joint states on a ROS topic.

Asked by Christian Rauch on 2019-09-20 11:28:16 UTC

Comments