chvmp / champ

MIT Cheetah I Implementation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How can I run robot in rest_mode?

iamchien opened this issue · comments

Hi @grassjelly and champ's developers,
I'm stuck in the control robot in rest_mode using the keyboard. I saw mini-cheetah in this gif (the white robot) do it. How can I run with your simulated model?
Thanks.

Hi, you would need a joystick to control the body's pose. Alternatively you can create a publisher using geometry_msgs/Pose to 'body_pose' topic.

What is your idea about rest mode?
I think the idea is as follows:
First, set a new pose of the body, then set a new position of each toe as the current value. Then calculate angle through inverse kinematic formula, right?

you can do that by changing the z value which is the height of the robot

That's exactly what I've seen in other developers with their 4-legged project. I don't obvious it. Please tell me more

You can use this as a starting point https://github.com/chvmp/champ_teleop/blob/master/champ_teleop.py#L102-L120 .
Rather than using the values from the joystick, you can slowly increase/decrease body_pose_lite.z until the robot reach the height that you want

Thanks, I also asked about whether or not possible to do rest_mode following steps which I mentioned above at r/robotics on Reddit. After that, I read your solution a few days ago and what I do not understand is the math behind it. It seems strange to me. There's nothing better than having it explained by its own author. That's why I open this issue. Can you explain it here? Or you can contact me via my email if it needed.

I wanna do rest_mode before do any other gait. So it can be as an experiment. I'm writing a code to do my idea, but I still need your idea. It's really worth it to me.

I have programmed a transition to z0.5 and repeatedly send z = 0.5. This gives me a rest pose. I also have an inactivity route be that transitions to rest after 30 seconds and turns off power to the servos after 60.

@Quothd You did it on a real robot? Unfortunately, I don't have a real one here. But I would like to see your, thanks

I'm away this weekend but realised that because mine is spending so much time on its stand, I needed more control so I modified the teleop node to support a web interface with touch button for stand / lie down, pose / walk and power control for the servo relay.

Relay servo power control makes it so much easier to switch between sim and robot control without needing to reinitialise anything.

The code needs a lot of cleaning up but happy to share if interested

@Quothd I'm glad to see your. Have you got champ's idea about rest_mode? Please tell me! I'm stuck in few days.

Closing this for now as this is not really an issue.

@grassjelly Ok, just want to say sorry.