/humanoid_robots_ros2

Collection of ROS2 packages for different humanoid robots for Webots with URDF and MoveIt configurations

Primary LanguageOpenSCAD

Collection of ROS2 packages for different humanoid robots

For each robot an URDF description and MoveIt configuration is provided. Additionally, PROTO model files for the Webots simulator are provided.

The goal of this repo is to allow people to easily test their software on different robot platforms. This allows validating if the algorithm is generally applicable, as well as direct comparison between achieved performances on a platform. For example, walk algorithms can be tested on all platforms and the achieved speeds on each robot can be compared.

The proto files are taken from https://humanoid.robocup.org/hl-vs2022/teams/ Some robots are not yet publicly in the git as we wait for some teams to provide licences for their model.

What currently works and what not

You should be able to launch the standalone.launch in the _description package and get a rviz2 display of your robot together with sliders to control the joints. This is mostly just for testing if the model is correct. All the launch files in the _moveit_config package are currently not working as the are generated by the moveit_setup_assistant which is only available in ROS1 currently. This is something which needs to be fixed and unnecessary launch files need to be cleaned up. It is currently waiting for MoveIt to finish up the work on the new setup assistant.

How to create a new robot based on a proto file

  1. Create a folder with ROBOT_NAME_description/protos
  2. Place proto and all texture/mesh files in this folder
  3. Copy worlds folder from another robot into ROBOT_NAME_description
  4. Change the name of the robot in all the .wbt files to the one of the new proto
  5. Run webots and open the world file to confirm that it is working. You should see the robot. Deal with any error messages (except not finding "hl_supervisor" that is okay).
  6. Copy the folders [config, launch, urdf] and the files [CMakeLists.txt, package.xml] from ANOTHER_ROBOT_NAME_description to ROBOT_NAME_description
  7. Replace all occurrences of ANOTHER_ROBOT_NAME_description with ROBOT_NAME_description in all the files (including filenames)
  8. Link the ROBOT_NAME_description directory in your ROS2 workspace (go to ROS2_WORKSAPCE/src directory and run ln -s SOME_PATH/ROBOT_NAME_description)
  9. Build the package (colcon build --packages-up-to ROBOT_NAME_description). Fix any compilation errors.
  10. Commit your changes until here, as we will need to change something in the proto for a moment.
  11. Change all HingeJointsWithBacklash to HingeJoints (the proto might already have a variable for this, otherwise use find/replace). This is necessary to do as otherwise the URDF export will generate two joints for each real joint, due to how HingeJointsWithBacklash are implemented.
  12. Open the world file again in webots to check if your model is still working. Fix any issues.
  13. Run webots convert -t URDF ROBOT_NAME.proto -o robot.urdf and put the .urdf file in the ROBOT_NAME_description/urdf folder
  14. Revert the changes to the proto file regarding the HingeJointsWithBacklash.
  15. Make the model follow ROS standards: manually add l_sole and r_sole frames if missing. Make sure that the base_link frame is between the first leg joints.
  16. Use the moveit_setup_assistant to create a ROBOT_NAME_moveit_config folder next to the ROBOT_NAME_description folder. See the MoveIt documentation for more information. You will need to create LeftLeg, RightLeg and Legs planning groups like in the other robots. At time of writing, the setup assistant is not working for ROS2, so you need to use the ROS1 version and change some files (compare to the other robots to see how).
  17. Build the package (colcon build --packages-up-to ROBOT_NAME_moveit_config). Fix any compilation errors.
  18. Source your ROS2 workspace, as we have a new package (source SOME_PATH/ROS2_WORKSAPCE/install/setup.bash)
  19. Run ros2 launch ROBOT_NAME_description standalone.launch. You should get a rviz2 view with your robot. Use the sliders to check if everything is okay. You might need to fix the joint limits (especially the knees should only bend to one side). Just edit these values in the URDF. Validate that the x_sole and imu_frame are correctly positioned and rotated.
  20. Edit the webots_robot_controller.py in wolfgang_webots_sim in the __init__() method by adding your robot to the other ones. Look into your proto to see what the names are.
  21. You should now be able to run ros2 launch wolfgang_webots_sim simulation.launch robot_type:=ROBOT_NAME and get a simulation of your robot.

Using the bitbots_quintic_walk with your robot

See here