- Connect the Kobuki to your laptop by USB (Switch On the robot)
- Check that the device has
rw
permission fordialout
group, and you are in this group
ls /dev/ttyUSB0
id
If you are not in dialout
group, add yourself to this group:
useradd ${USER} dialout
Logout and login again.
- Clone this repo in your workspace. Let's assume that your workspace is
~/ros2_ws
cd ~/ros2_ws/src
gir clone -b humble https://github.com/IntelligentRoboticsLabs/Robots.git
- Download the repos with the kobuki driver and utils
cd ~/ros2_ws/src
vcs import . < Robots/kobuki/third_parties.repos
- Try to install from packages as much dependencies as possible
cd ~/ros2_ws
rosdep install --from-paths src --ignore-src -r -y
- Compile the workspace
cd ~/ros2_ws
colcon build --symlink-install
- Source the workspace or open a new terminal (if sources in .bashrc)
- Use the kobuki utils to create the udev rules
cd src/ThirdParty/kobuki_ftdi
sudo mv 60-kobuki.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules && sudo udevadm trigger
- Let's launch the kobuki driver to test that everything went ok
On terminal 1:
ros2 launch ir_kobuki kobuki_rplidar.launch.py
You should have listened a sound that indicates that the driver succesfully communicated with the robot. Check permissions otherwise
On terminal 2:
ros2 topic list
You should be seeing the topics
The drivers have been already downloaded and built in the previous sections, but we need to manually create the udev rules
- Create the file
/dev/udev.d/rplidar.xxx
with this content - restart udev
sudo udevadm control --reload-rules && sudo udevadm trigger
- Run the driver
ros2 launch rplidar_ros rplidar.launch.py
- Visualize the
/scan
topic in RViz2 (framelaser
)
ros2 launch ir_kobuki kobuki_rplidar.launch.py
Open RViz2 and check TFs and Laser
Move model to GAZEBO_MODEL_PATH
mkdir -p ~/.gazebo/models/ir_kobuki
cd <your-workspace>/src/Robots/kobuki/
cp -r models/ ~/.gazebo/models/ir_kobuki/models/meshes
ros2 launch ir_kobuki sim.launch.py