chvmp / champ

MIT Cheetah I Implementation
BSD 3-Clause "New" or "Revised" License
1.47k stars 342 forks source link

Ros2 galactic port #85

Closed AlexKaravaev closed 2 years ago

AlexKaravaev commented 2 years ago

Description

Hi!

I decided to push my efforts of porting this package to ros2. I am creating now draft pull request, just so my progress would be visible and maybe this way I would not reinvent the wheel :) Also, please, could you create a branch ros2 in your upstream repo? And also in libchamp repo, champ_teleop and yocs_velocity_smoother. Setting it to master for now.

Known difficulties and issues

AlexKaravaev commented 2 years ago

Here is quick video demo of what I've ported so far

https://user-images.githubusercontent.com/30314738/170779523-a6bb573e-c88a-4051-9eda-d7c2746dd4bd.mov

https://user-images.githubusercontent.com/30314738/170779633-9a349005-1782-4ba2-aaa7-53f2b9fda7c8.mov

grassjelly commented 2 years ago

Hi @AlexKaravaev , thanks for this PR. Created a new ros2 branch. Did the same for libchamp. Thank you!

grassjelly commented 2 years ago

Hey @jediofgever . Could be point no. 1 be the same issue you’re encountering?

Description

Hi!

I decided to push my efforts of porting this package to ros2. I am creating now draft pull request, just so my progress would be visible and maybe this way I would not reinvent the wheel :) Also, please, could you create a branch ros2 in your upstream repo? And also in libchamp repo, champ_teleop and yocs_velocity_smoother. Setting it to master for now.

  • [x] Port libchamp. Here I will insert the link to corresponding PR in libchamp
  • [ ] Port velocity smoother.
  • [x] Working Gazebo empty world, without velocity control, just standing still robot with effort controllers centered.
  • [x] Working rviz only demo.
  • [ ] Working Gazebo with teleop robot.
  • [ ] Working Gazebo demo with SLAM.
  • [ ] Working Gazebo demo with nav2 integration.
  • [ ] Code clean-up and refactoring.
  • [ ] Testing with real robot. Since I don't have one, I would have this point out of the scope of this current issue and focus solely on gazebo port.

Known difficulties and issues

  • ros2_controllers official upstream repo doesn't have effort controller implemented yet. Right now sticked to ros2-controllers repo. See issue.
  • I have tried to set-up gazebo ignition simulation, but somehow I can not get RTF more that 0.1. Given that in gazebo classic it runs smoothly with 1.0 RTF, I recalled that it's something with ignition and moved forward.

Hey @jediofgever . Could be point no. 1 be the same issue you’re encountering?

jediofgever commented 2 years ago

@grassjelly , I think that is a possibility, this is what I use for ros2 control config. The type is joint_trajectory_controller/JointTrajectoryController, as I recall in ros1, this was effort_controllers/JointTrajectoryController. From the PR @AlexKaravaev referenced, there seems to be an effort_controllers/JointTrajectoryController for foxy at here, I will try that and update here in a later time.

AlexKaravaev commented 2 years ago

@jediofgever Oh I haven't seen that you actually started porting it ros2 already, awesome work! We definetely can somehow merge your one and this one into one.

As for joint_trajectory_controller/JointTrajectoryController I haven't yet tried the gait with gazebo. But you can observe behavior without gate, just using manual joint control in the video above.

Are you using ignition gazebo or classic one? I observed very strange behavior in ignition and finally switched to classic

AlexKaravaev commented 2 years ago

@grassjelly hi! This PR wasn't finished yet. Do you think it's better to open new one?

grassjelly commented 2 years ago

hey @AlexKaravaev yes pls