- 基于ros2_control开发
- 支持Ignition-Fortress(humble)仿真环境
- SP_CONTROL在ROS2上的重写,使用逻辑相近
- 更易使用的底层设备接口
NOTE: 如果使用虚拟机,请关闭设置中的3D加速功能,否则可能引起渲染错误。
-
sudo apt-get update sudo apt-get install lsb-release wget gnupg sudo wget https://packages.osrfoundation.org/gazebo.gpg -O /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null sudo apt-get update sudo apt-get install ignition-fortress
-
sudo apt-get update sudo apt-get install ros-humble-ign-ros2-control
-
sudo apt-get update sudo apt install ros-humble-ros-gz
-
运行命令打开仿真环境,等待模型及控制器加载完成
ros2 launch sp2_description robot_ignition_sim.launch.py
-
发布运动控制话题
effort_controllers/cmd_vel_unstamped
ros2 topic pub effort_controllers/cmd_vel_unstamped geometry_msgs/msg/Twist "{linear: {x: 2.0, y: 0.0, z: 0.0}, angular: {x: 0.0, y: 0.0, z: 0.0}}"