This project contains the launchers to run the Turtlebot2 Kobuki, both in simulated running different Gazebo worlds, as in the real robot using its drivers.
ROS2 Distro | Ubuntu | Branch | Build status | Date last CI |
---|---|---|---|---|
rolling |
||||
jazzy |
||||
jazzy-devel |
You need to have previously installed ROS2. Please follow this guide if you don't have it.
source /opt/ros/<ROS-DISTRO>/setup.bash
Clone the repository to your workspace:
cd <ros2-workspace>/src
git clone https://github.com/IntelligentRoboticsLabs/kobuki.git
Prepare your thirparty repos:
sudo apt update && sudo apt install ros-dev-tools -y
cd <ros2-workspace>/src/
vcs import < kobuki/thirdparty.repos
Please make sure that this last command has not failed. If this happens, run it again.
sudo apt install libusb-1.0-0-dev libftdi1-dev libuvc-dev
When you connect a piece of hardware to your pc, it assigns /dev/ttyUSB*
to it. This will not have the necessary read/write permissions, so we will not be able to use it correctly. The solution is to set up some udev rules that creates a symlink with another name (example: /dev/ttyUSB0
-> /dev/kobuki
) and grants it the necessary permissions.
cd <ros2-workspace>
sudo cp src/ThirdParty/ros_astra_camera/astra_camera/scripts/56-orbbec-usb.rules /etc/udev/rules.d/
sudo cp src/ThirdParty/rplidar_ros/scripts/rplidar.rules /etc/udev/rules.d/
sudo cp src/ThirdParty/kobuki_ros/60-kobuki.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules && sudo udevadm trigger
sudo rosdep init
rosdep update
rosdep install --from-paths src --ignore-src -r -y
colcon build --symlink-install
If your terminal has crashed or closed while compiling, please try compiling your packages as follows
colcon build --symlink-install --parallel-workers 1
or do so by selecting the package that failedcolcon build --symlink-install --parallel-workers 1 --packages-select <package>
Also, if you want to prevent it from recompiling that package, add a
COLCON_IGNORE
inside the package
You can launch the simulator as follows:
ros2 launch kobuki simulation.launch.py
Or you can add the path of your world to the world parameter like this:
ros2 launch kobuki simulation.launch.py world:=install/aws_robomaker_small_warehouse_world/share/aws_robomaker_small_warehouse_world/worlds/small_warehouse/small_warehouse.world
Run the kobuki drivers:
ros2 launch kobuki kobuki.launch.py
If you want to use a lidar or camera, you have to set the following parameters to true:
ros2 launch kobuki kobuki.launch.py lidar_a2:=true
ros2 launch kobuki kobuki.launch.py lidar_s2:=true
ros2 launch kobuki kobuki.launch.py xtion:=true
ros2 launch kobuki kobuki.launch.py astra:=true
You can use Nav2 using robot with this launcher:
ros2 launch kobuki navigation.launch.py map:=<path-to-map>
or this other command if you need to navigate in the simulator
ros2 launch kobuki navigation_sim.launch.py
If you want to use another map, you have to put the route in the map parameter
This is a project made by the Intelligent Robotics Lab, a research group from the Universidad Rey Juan Carlos. Copyright © 2024.
Maintainers: