Star this repository to keep up to date with the latest changes.
If ROS2 is not yet installed, please follow the official installation guide for ROS2 Humble.
Open a terminal (CTRL+ALT+T) and run the following commands:
mkdir -p ~/limo_ws/src
cd ~/limo_ws/src
git clone https://github.com/idra-lab/limo_ros2.git
cd ..chmod +x src/limo_ros2/setup_limo_ros2.sh
./src/limo_ros2/setup_limo_ros2.shInstall custom ros2-gz-control package, which provides the necessary interfaces to control robots in Gazebo with ROS2.
cd src
git clone https://github.com/tamasso-parec/gz_ros2_control.git
cd ..Download and install joint-state-publisher-gui package.This package is used to visualize the joint control.
sudo apt-get install ros-humble-joint-state-publisher-gui Download and install rqt-robot-steering plug-in, rqt_robot_steering is a ROS tool closely related to robot motion control, it can send the control command of robot linear motion and steering motion, and the robot motion can be easily controlled through the sliding bar
sudo apt-get install ros-humble-rqt-robot-steering Download and install teleop-twist-keyboard
sudo apt-get install ros-humble-teleop-twist-keyboardsudo apt install ros-humble-ros2-control ros-humble-ros2-controllerssudo apt-get update
sudo apt-get install curl lsb-release gnupgsudo curl https://packages.osrfoundation.org/gazebo.gpg --output /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] https://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 gz-harmonicapt-get install ros-humble-ros-gzharmonicSource your ROS2 Humble installation:
source /opt/ros/humble/setup.bashsudo apt-get install python-pip
sudo pip install -U rosdep
sudo rosdep init
rosdep updateInstall dependencies using rosdep:
rosdep update
rosdep install --from-paths src --ignore-src -r -ysource /opt/ros/humble/setup.bashcolcon buildSource the workspace:
source install/setup.bashros2 launch limo_car ackermann_gazebo.launch.pyIn another terminal, source the workspace again:
source /opt/ros/humble/setup.bash
source ~/limo_ws/install/setup.bashand run the robot steering GUI:
ros2 run rqt_robot_steering rqt_robot_steering --ros-args --remap /cmd_vel:=/ackermann_steering_controller/reference Or using the teleop twist keyboard tool to command the robot with keybord inputs:
ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args --remap cmd_vel:=/ackermann_steering_controller/reference -p stamped:=trueTommaso Faraci
IDRA Lab, University of Trento
Email: tommaso.faraci@unitn.it