ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

How to use IK library inside Python SMACH state (Python)?

asked 2017-11-27 09:29:04 -0600

updated 2018-01-30 12:49:41 -0600

I want to create create complex behaviors using the SMACH library (e.g. grasping an object, bipod walking, etc).

In order to maintain flexibility, inside my SMACH state machines, I've used parameterized states (e.g. I have a MoveAlongPath state which I instantiate with a list of joint waypoints to produce different movements: lift leg, plant leg, etc).

I want to use an inverse kinematics library inside a SMACH state (e.g. Calculate IK) to generate a list of waypoints (which will be passed on to instances of the Movement state).

I am interested in the HEBI Robotics API and the trac_ik library - both of which are in C++.

My question is:
What's the recommended ROS way to make calls to a C++ IK library from inside a Python SMACH state?

... Boost Python, C++ SimpleActionServer?

trac_ik has a pull request for a python wrapper but it hasn't been merged in yet.
As of 2018/29/01

edit retag flag offensive close merge delete



Why delete the question? Have you solved it? If so, then please post an answer and accept your own answer.

gvdhoorn gravatar image gvdhoorn  ( 2018-01-30 12:32:34 -0600 )edit

I didn't really solve the question as stated, but trac_ik_python has been released - eliminating the original need. I have modified the question title, added my own answer, and undeleted the question as recommended.

josephcoombe gravatar image josephcoombe  ( 2018-01-30 12:44:04 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2018-01-30 12:41:16 -0600

updated 2018-01-30 12:51:38 -0600

As of 2018-01-04, trac_ik has swig based python wrapper trac_ik_python

As of ~2018-01-31, this will be available in the ROS kinetic repository.

$ sudo apt-get install ros-kinetic-trac-ik

or from source at

Additionally, HEBI is developing a Python API and a ROS API for their motors/kinematics library

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2017-11-27 09:29:04 -0600

Seen: 224 times

Last updated: Jan 30 '18