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

Affix a joint when in contact with floor (humanoid feet in ROS2)

asked 2019-12-31 10:57:43 -0500

guru_florida gravatar image

updated 2019-12-31 11:00:54 -0500

Hi all. I'm using ROS2 eloquent. How do we affix a joint in space programatically and not in URDF? The joint is not permanently fixed nor do I want to affix to its parent frame but to a point in space relative to the world or odom frame. Basically, how do I tell the TF system that the foot should not move since it is in contact with the floor?

I've added an IMU to my humanoid and used robot_localization node to update the robot state/pose. However the robot IMU response rotates around the torso in RViz because the system knows nothing of the feet being planted on the floor. Since the feet are not fixed to the floor they are free to float around when TF is solved.Since the torso or base_link is the IK root I suppose it chooses this as the rotational root by default.

I believe the robot_state_publisher node is doing the TF based on the code I see there. It seems like there is no way to do this unless I modify robot_state_publisher but I'm thinking someone must have solved this already. Perhaps the footprint frame should be the IK root but this isn't the frame hierarchy that REP-120 recommends. With proper affixing of the feet I can then also compute proper odemetry as the humanoid walks.

Thanks, Colin

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-01-17 10:27:50 -0500

guru_florida gravatar image

So I was able to get this to work but only by changing the frame linkage from world => base_link to world => footprint frame. This is against the recommended linkage in REP-120 but it seems pretty logical to me that the footprint would be the connection to the floor frame not base_link and maybe the REP-120 should be updated? Please correct me if I am misguided.

edit flag offensive delete link more

Comments

I have a feeling the issue is you are treating "the floor" as something special. It is not. TF is a tree-based system that models/stores transforms. RViz consumes that information, together with your robot model (ie: urdf) to render your robot in the "correct pose". The frame RViz takes as the root frame is something you configure in the general options (this is the Fixed Frame).

But that is really only visualisation. There is no connection to any "ground", nor is "ground" a concept RViz supports or treats special.

So in the end you have a free-floating tree structure with a bunch of meshes attached. It doesn't matter at which frame you start, as it will never connect to anything. The only thing which will change is the way the visualisation looks.

Basically, how do I tell the TF system that the foot should not move since it ...

(more)
gvdhoorn gravatar image gvdhoorn  ( 2020-01-17 11:14:00 -0500 )edit

Correct, I was simplifying things by saying floor. I am in the process of writing a node that detects foot-floor contact and it will also then update the odom frame accordingly as well. I get this part and I already have Orocos lib computing some of my own transforms. The issue is that with world/odom connected to base_link the existing IMU localization rotates the robot around the point of the torso (where base_link is), but it should be at the bottom of the robot wherever the contact of the floor is. You're also right about RViz now looks right only because I have World selected as my Fixed Frame but also the IMU rotation looks correct now because I have temporarily put footprint near the soles of the feet.

I could have my node recompute base_link location based on IMU data but then I feel I am just ...(more)

guru_florida gravatar image guru_florida  ( 2020-01-17 11:28:12 -0500 )edit

Question Tools

3 followers

Stats

Asked: 2019-12-31 10:57:43 -0500

Seen: 235 times

Last updated: Jan 17 '20