ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Is there a moveit package that will print me out the IK and FK equations from a URDF?

asked 2019-11-05 15:08:30 -0500

Wireline gravatar image

updated 2019-11-05 15:27:27 -0500

Hi

I would like to get the full IK and FK equations for a new robot design, which is not the same as any existing robot i.e. I cannot just use an existing solution.

I have been working the equations by hand, drawing kinematic diagrams and constructing the homogeneous transformation matrices etc, when someone mentioned that using a URDF and 'a moveit package' would allow me to solve the IK and FK without doing any of the analysis. I have seen the IK Fast and Trac-IK solvers, but have not been able to tell if they can give me the output I need or if they just communicate somehow with ROS in the background.

The output I need is a printout of the full equations, to be used / pasted (with any necessary code modifications made by myself) in a c file used without ROS. Is this possible?

Thanks!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-11-05 16:19:33 -0500

updated 2019-11-07 10:04:57 -0500

Trac-IK and KDL are both numerical solvers. They will not have the ability to produce source code for IK or FK. IKFast does exactly that. If you properly run IKFast on a given robot, it can auto-generate code for FK/IK. Check out the MoveIt! tutorial on how to do this for a good resource. Note, if you just want the standalone source code you can even skip the Create Plugin step.

Note, the code that is generated through this process is not very human-readable.

EDITHere's an example IKFast-generated source file for Baxter's right arm: https://github.com/ros-planning/movei... You'll see what I mean about it not being very human-readable. However, note that there are functions defined such as void ComputeFk(const IkReal* j, IkReal* eetrans, IkReal* eerot) and bool ComputeIk(const IkReal* eetrans, const IkReal* eerot, const IkReal* pfree, IkSolutionListBase<IkReal>& solutions)

edit flag offensive delete link more

Comments

Thanks for your reply, its appreciated. I did see that tutorial before and I could not see it referenced, but are the matrices / equations embedded in the code somehow? I am looking for the usual string of cosines, sines, link lengths etc that you see when you multiply through the homogenous equations. EDIT: Ah missed you edit! I will take a look

Wireline gravatar image Wireline  ( 2019-11-05 16:26:08 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2019-11-05 15:08:30 -0500

Seen: 406 times

Last updated: Nov 07 '19