jstmn / jrl

Jeremy's Robotics Library
MIT License
36 stars 3 forks source link

floating joint #7

Closed ZhengmaoHe closed 8 months ago

ZhengmaoHe commented 9 months ago

Hello! Thank you for such a great work, this is very useful for solving robotics problems quickly!

I checked your repository and saw that floating joints are not currently supported. I was wondering if you have any plans to support floating joints? This is crucial for mobile robots and is urgently needed for my current research too.

ZhengmaoHe commented 9 months ago

Specifically, what I need is to solve the forward kinematics of a mobile manipulator with floating joints.

jstmn commented 9 months ago

Hi, glad to hear you're finding it useful!

Floating joints shouldn't be an issue, I'll take a crack at implementing this joint type this week.

Also, what robot are you using?

ZhengmaoHe commented 9 months ago

Very happy to receive your reply, thank you for your help and I look forward to your good news! I'm using a quadruped robot, specifically, Unitree's Aliengo.

jstmn commented 9 months ago

Hey, can you clarify what exactly you want the FK function to do for the aliengo? Do you want it to return the pose of each of the 4 feet?

This code is designed for single chain kinematic systems, so only a single end effector is possible

ZhengmaoHe commented 9 months ago

Yes, I want to use it to calculate the end pose of the dog's two front feet. You don't need to worry about this, I have processed it into two single chain urdf (trunk-hip-thigh-calf-foot)

jstmn commented 9 months ago

Hey, this would require a non trivial amount of work to implement so unfortunately I don't think i'm going to do it. The issue is that the current FK and jacobian code is written with the assumption that each joint has 1 dof, but floating joints have 6dof.

A straightforward workaround (afaik) would be to add three prismatic joints, and three revolute joints for the positional and rotational component of the base of the robot. Any reason that shouldn't work?

ZhengmaoHe commented 9 months ago

Thank you for the suggestion. If I have time, I will try to directly calculate the transformation matrix using the pose of the floating base, transform the end effector pose of the fixed base, and obtain the end effector pose of the mobile manipulator.