NDHANA94 / hyperdog_ros2

HyperDog is a quadruped robot which is fully based on ROS 2 and Micro-ROS
63 stars 17 forks source link

Model Sliding in Gazebo #20

Open lukasehr opened 1 month ago

lukasehr commented 1 month ago

Hey there, under known bugs, it says there is a problem with ros2 ctrl pkg which makes the robot slide on the ground. I also experience that issue. Has there been any updates relating that problem. Is there a way to fix it? I've seen under the closed issues that someone might have fixed it, are those changes already adapted?

NDHANA94 commented 1 month ago

Hi, No unfortunately, I'm planning to update the repo soon with PyBullet simulation. PyBullet has no this issue.

lukasehr commented 1 month ago

Oh okay. Do you think it is fixable with Gazebo aswell? I mean there are other gait generators without that issue in gazebo. Is it a problem with the feedforwardcontroller?

My prof said I have to make it work in gazebo for the bachelor thesis. However I was not successful so far and if you say it is unfixable I have to talk to him again concerning that problem.

Thanks a lot for the answer!

NDHANA94 commented 1 month ago

We tried everything possible to fix the issue. Still the situation is the same. There are more legged robots working on gazebo, yes. However, they are using ROS1. ROS1 gazebo control plugin has no this issue. Ros 2 gazebo control plugin has no option to change the PID gains of joints, this is the issue causing this slipperiness.

NDHANA94 commented 1 month ago

With that being said, you can try to create a ROS1 PKG to run the simulation using ROS1 control plugin. And use Ros bridge to send joint angles to the simulation

NDHANA94 commented 1 month ago

Well, maybe latest version of ros2 gazebo control plugin has already solved this issue. I haven't checked them. U can give it a shot and let me know as well.

lukasehr commented 1 month ago

So I am trying to make the hyperdog gaitgen as well as the champ gaitgen work in Ros2 with Gazebo11. The Champ gaitgen is actually working pretty well. My idea was to compare the two and find if there are some significant differences, but so far I was not successfull. In champ, there is actually a way to change the PID values, here is the .yaml file of it:

Champ Gaitgen

controller_manager: ros__parameters: use_sim_time: True update_rate: 250 # Hz

joint_states_controller:
  type: joint_state_controller/JointStateBroadcaster

joint_state_broadcaster:
  type: joint_state_broadcaster/JointStateBroadcaster     

joint_group_effort_controller:
  type: joint_trajectory_controller/JointTrajectoryController 

joint_group_effort_controller: ros__parameters: use_sim_time: True joints:

lukasehr commented 1 month ago

I mean it would be very cool if hyperdog would work, do you think with that information it is possible to fix or no? Is it possible that not the whole ros2 gazebo control is bugged, but only the gazebo_joint_controller: type: forward_command_controller/ForwardCommandController

?

NDHANA94 commented 1 month ago

Great, I'll try to fix it. Gimme a couple of days. I'll write to you if I'll nailed it))

lukasehr commented 1 month ago

Wow that would be soo dope! I am honestly devasted as I have to make it work but I have no more ideas how to do so :( If I can help you somehow, please let me know!

TharitSinsunthorn commented 1 month ago

@lukasehr I think it's a setting up of urdf also, you need to tune the physics properties carefully. I have tried to use this repo before with another legged robot URDF, in my case unitree can walk on the gazebo. I'm also beginner on this, but in my opinion, try to adjust the friction of the gazebo tag and ros2 control parameters. Also, I'm not sure about the effect of the .dae mesh, but I have heard that .dae is better if you want to do the physics simulation with collision geometry.

@NDHANA94 If you have any comment, please guide me as well. Anyway thank you very much for you great work!

lukasehr commented 1 month ago

@TharitSinsunthorn i tried playing around with the friction settings (mu1 & mu2), I wasn’t really successful with that. Which ros2 control Parameters do you mean, will give it a try 👍

thanks for the suggestions!

TharitSinsunthorn commented 1 month ago

As you gave the example from champ. Im also using joint_trajectory_controller in humble. I tried to tune the PID value and some how it fix the sliding problem. Here is some of my yaml file

`RFposition_trajectory_controller: ros__parameters: joints: