Table of Contents
Tortugabot ROS 2 Jazzy on Ubuntu 24.04
For the Ubuntu 20.04 ROS 1 install, go to the ROS1 Noetic setup.
Install Ubuntu 24.04 on ThinkPad e485 AMD Ryzen 5
- Get Ubuntu 24.04 Desktop
- Prepare a bootable pen drive
- Hit F12 on boot to reach the drive selection
In the GRUB, hit 'e' on the first entry to edit boot parameters. Ubuntu boot needs special parameters for these e485 laptops. Edit the line starting with linux
and add ivrs_ioapic[32]=00:14.0 spec_store_bypass_disable=prctl
to it, so it says something like this:
linux /casper/vmlinuz --- quiet splash ivrs_ioapic[32]=00:14.0 spec_store_bypass_disable=prctl
This is required on every boot. Without these parameters, Ubuntu will be stuck on boot, showing only a cursor on black. To set them to default, first install Ubuntu as usual, reboot (enter boot params again).
Edit the GRUB config. Edit the grub boot file with root rights
sudo nano /etc/default/grub
Modify GRUB_CMDLINE_LINUX_DEFAULT
, copy the parameters above and paste (Ctrl+Shift+V) so it says something like this:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash ivrs_ioapic[32]=00:14.0 spec_store_bypass_disable=prctl"
Finally, update your GRUB config to make these parameters permanent with.
sudo update-grub
Install ROS 2 Jazzy
Follow the Debian install guide for ROS 2 Jazzy Jalisco
Tortugabot WiFi setup
Use the network 'tortugabot' to get internet and a local WiFi. Ask a colleague for the password. The WiFi is available nearby the robot labs.
Hokuyo LAN Config
When connecting the Hokuyo laser sensor via LAN, the connection must be configured manually. This way, the laptop can directly communicate with the LIDAR. Connect the Battery to the Tortugabot to give power to the Hokuyo LIDAR, then connect it via LAN to this laptop. Open Wired Settings and configure the profile. Set IPv4 to Manual and give it an IP and Submask.
DS3 Controller Bluetooth Setup
The controller can be set up via cable-pairing.
- Enable Bluetooth on the laptop and keep the Bluetooth settings open.
- Connect the controller via Mini-USB with the laptop
- On the controller, the four red light should now blink.
- A popup will ask for permission to pair. Accept.
- Unplug the controller
- Press the PS button between Start and Select
- LED 1 should now continuously glow on the controller
- Bluetooth settings show the paired DS3 controller.
If the Bluetooth client refuses to connect shows a pairing code, disable classic-bond-only. Open up /etc/bluetooth/input.conf
and set the parameter ClassicBondedOnly=false
.
To test the connection, run the joy controller
ros2 run joy joy_node
and listen to the button feedback in another terminal.
ros2 topic echo /joy
Roboclaw connection permission
Roboclaw complains that you don't have the permission to open 'ttyACM0'. The connection to Roboclaw is only permitted for users who are in the 'dialout' group. Add your user like this:
sudo adduser $USER dialout
Then reboot your PC. Check if the user is in the dialout
group by calling groups
in bash.
Workspace setup
Set up new workspace as described in the ROS2 wiki, named tortugabot_ws
https://docs.ros.org/en/jazzy/Tutorials/Beginner-Client-Libraries/Creating-A-Workspace/Creating-A-Workspace.html
mkdir -p ~/tortugabot_ws/src
Source the ROS2 build.
source /opt/ros/jazzy/setup.bash
Now set up the workspace with the roboclaw controller code
# go to the src subdirectory cd ~/tortugabot_ws/src # pull the roboclaw controller git clone -b ros2 https://github.com/code-iai/roboclaw_ros.git cd .. # install dependencies rosdep install -i --from-path src --rosdistro jazzy -y # build the workspace colcon build # source the build source install/local_setup.bash
Connect the turtle to battery, and USB from the roboclaw to laptop.
Execute the test script in the roboclaw controller https://github.com/code-iai/roboclaw_ros/tree/ros2/roboclaw_node/roboclaw_driver/roboclaw_driver_test.py
ros2 run roboclaw_node test_claw
The wheels should now move a bit.
Troubleshoot Roboclaw low-level
On first startup it may be stuck. Restart the script.
Make sure the LED on the roboclaw hardware is lit, which indicates a connected battery. If not, change the battery and check the cables. When the roboclaw gets a command the LED quickly blinks with every new input.
If the ROS2 command for the test doesn't work, call the script directly.
python src/roboclaw_node/roboclaw_driver/roboclaw_driver_test.py
Make sure python is at version 3.X with python –version
.
If the socket connection to the roboclaw chip can't be established, check out the 'Roboclaw connection permission section' above.
Driver Port to ROS2
The Roboclaw Node is now ported to ROS2 Jazzy. https://github.com/code-iai/roboclaw_ros/tree/ros2
ros2 launch roboclaw_node roboclaw_launch.py
The Navigation Stack has not been investigated jet.