diff --git a/.images/gazebo.png b/.images/gazebo.png new file mode 100644 index 0000000..e4999d8 Binary files /dev/null and b/.images/gazebo.png differ diff --git a/.images/gazebo_classic.png b/.images/gazebo_classic.png index 097e52a..f0d37dd 100644 Binary files a/.images/gazebo_classic.png and b/.images/gazebo_classic.png differ diff --git a/.images/mujoco.png b/.images/mujoco.png new file mode 100644 index 0000000..a891f20 Binary files /dev/null and b/.images/mujoco.png differ diff --git a/README.md b/README.md index 769f4b1..d0a1561 100644 --- a/README.md +++ b/README.md @@ -34,18 +34,23 @@ Video for OCS2 Quadruped Controller: ``` * Compile the package ```bash - colcon build --packages-up-to unitree_guide_controller go2_description keyboard_input hardware_unitree_mujoco + colcon build --packages-up-to unitree_guide_controller go2_description keyboard_input ``` ### 1.1 Mujoco Simulator -Please use this [Mujoco Simulation](https://github.com/legubiao/unitree_mujoco) for more robot models and contact +Please use **C++ Simulation** in this [Mujoco Simulation](https://github.com/legubiao/unitree_mujoco) for more robot models and contact sensor. > **Warning:** CycloneDDS ROS2 RMW may conflict with unitree_sdk2. If you cannot launch unitree mujoco simulation > without `sudo`, then you cannot used `unitree_mujoco_hardware`. You can switch to gazebo, or try to solve the conflict > by uninstall CycloneDDS ROS2 RMW. +* Compile Unitree Hardware Interfaces + ```bash + cd ~/ros2_ws + colcon build --packages-up-to hardware_unitree_mujoco + ``` * Launch the unitree mujoco go2 simulation * Launch the ros2-control ```bash @@ -58,6 +63,8 @@ sensor. ros2 run keyboard_input keyboard_input ``` +![mujoco](.images/mujoco.png) + ### 1.2 Gazebo Classic Simulator (ROS2 Humble) * Install Gazebo Classic ```bash @@ -102,6 +109,7 @@ sensor. source ~/ros2_ws/install/setup.bash ros2 run keyboard_input keyboard_input ``` +![gazebo](.images/gazebo.png) For more details, please refer to the [unitree guide controller](controllers/unitree_guide_controller/) and [go2 description](descriptions/unitree/go2_description/). diff --git a/controllers/leg_pd_controller/src/LegPdController.cpp b/controllers/leg_pd_controller/src/LegPdController.cpp index ffe90b1..ed5a07b 100644 --- a/controllers/leg_pd_controller/src/LegPdController.cpp +++ b/controllers/leg_pd_controller/src/LegPdController.cpp @@ -53,9 +53,7 @@ namespace leg_pd_controller { controller_interface::CallbackReturn LegPdController::on_configure( const rclcpp_lifecycle::State & /*previous_state*/) { -#ifdef ROS2_CONTROL_VERSION_LT_3 reference_interfaces_.resize(joint_names_.size() * 5, std::numeric_limits::quiet_NaN()); -#endif return CallbackReturn::SUCCESS; }