Skip to content

rigbetellabs/tortoisebot_pro

Repository files navigation

Tortoisebot-Pro ROS2 Humble Release

TortoiseBot Banner

stars forks watchers repo-size contributors


Connect with UsInstallation

TortoiseBot-Pro

Connect with us some-changes

Website Discord Channel Youtube Subscribers Instagram

TortoiseBot-Pro

Table of Contents
  1. Installation
  2. Connection
  3. Package Description
    1. tortoisebotpro_bringup
    2. tortoisebotpro_description
    3. tortoisebotpro_firmware
    4. tortoisebotpro_gazebo
    5. tortoisebotpro_navigation
    6. tortoisebotpro_slam
    7. install.sh
  4. Launch Sequence
    1. Gazebo Simulation
      1. Map Generation
      2. Autonomous Navigation in the saved map
      3. SLAM
    2. Actual Robot
      1. Map Generation
      2. Autonomous Navigation in the saved map
      3. SLAM
  5. General Robot Information
    1. Topic Description
    2. Battery
    3. Robot Velocities
    4. USB Ports
  6. USB Port Configuration for ESP and LiDAR

1. Installation

Clone the repository into your workspace,

cd ~/ros2_ws/src # Assuming ros2_ws is the name of the workspace
git clone https://github.com/rigbetellabs/tortoisebot_pro.git

Build the workspace,

cd ~/ros2_ws/
colcon build

Installation of dependent packages,

cd ~/ros2_ws/src/
cat requirements.txt | xargs sudo apt-get install -y 
# This installs all the packages mentioned in the requirements.txt

Note

Check if you already have the lidar packages installed; if not, get the packages from repos below.

cd ~/ros2_ws/src/
git clone https://github.com/rigbetellabs/ydlidar_ros.git

2. Connection

Wifi Setup?

To start any operation within the robot we need to SSH into and then perform operations.

Note

After switching the robot ON the Computing device takes a minute or so to boot up, wait for a while and then SSH into the robot using the below credentials.

ssh "your-robot-name"@"your-robot-ip"

Note

Please refer the robot for robot_name and the login password. Verify the IP that gets assigned to the robot via your network manager.

If you do not want to recheck if robot is connected to the network now or then you can utilize the connect_tortoisebotpro.sh script.

./connect_tortoisebotpro.sh "username" "robot-ip"

The scripts scan the local network you are connected to and initiates a SSH connection if the robot is connected, the process continues until the robot is connected.

Successful execution looks something like this.

3. Package Description

Provides a unified launch file to bring up the entire TortoiseBot Pro system including simulation, URDF, sensors, and navigation stack.

File Description Nodes Launched
autobringup.launch.py Launches the complete robot system including state publisher, Gazebo (for simulation), camera node, micro-ROS agent, Cartographer or Nav2 (based on argument), depending on mode selected.

Arguments:
use_sim_time: Set to True for simulation, False for real robot.
exploration: Set to True to run SLAM (Cartographer), False to use pre-saved map with Nav2.
/robot_state_publisher,
/joint_state_publisher,
gazebo,
camera_controller,
micro_ros_agent,
nav2_bringup or cartographer

Example Commands:

  • Simulation + SLAM (exploration):

    ros2 launch tortoisebotpro_bringup autobringup.launch.py use_sim_time:=True exploration:=True
  • Simulation + Navigation (with saved map):

    ros2 launch tortoisebotpro_bringup autobringup.launch.py use_sim_time:=True exploration:=False
  • Real Robot + SLAM (exploration):

    ros2 launch tortoisebotpro_bringup autobringup.launch.py use_sim_time:=False exploration:=True
  • Real Robot + Navigation (with saved map):

    ros2 launch tortoisebotpro_bringup autobringup.launch.py use_sim_time:=False exploration:=False

To save a map after SLAM:

ros2 run nav2_map_server map_saver_cli -f /home/<your-nuc-user>/ros2_ws/src/tortoisebot_pro-ros2/tortoisebotpro_navigation/maps/test1

Replace <your-nuc-user> with your actual robot's NUC username in the path.

Holds the robot description including urdf, stl

File Description Nodes Launched
state_publisher.launch.py Starts the publishign of the robot urdf on the topic /robot_description. /robot_state_publisher, /joint_state_publisher

As the name suggest get all the sensor and actuation topics available to you

File Description Nodes Launched
micro_ros.launch.py Launches Robot state publishers, serial node for communication with ESP32. /cmd_vel, /wheels_ticks, /imu_data

Simulation environment for tortoisebotpro in Gazebo

File Description Nodes Launched
gazebo.launch.py Launches gazebo basic world. /spawn_urdf, /gazebo

Autonomous navigation of robot using move_base in a know as well as unknown environment

File Description Node Launched
navigation.launch.py Launches the nav2 stack to navigate the robot, and based on exploration parameter it launches with saved map and without saved map . /nav2

SLAM!

File Description Node Launched
cartographer.launch To generate the map of the environment using Cartographer. /cartographer_node

We have installed everything for you no need to worry about!

4. Launch Sequence

4.1 Gazebo Simulation

4.1.1 Map Generation

ros2 launch tortoisebotpro_bringup autobringup.launch use_sim_time:=True exploration:=True # To launch The robot in sim without a saved map

ros2 run teleop_twist_keyboard teleop_twist_keyboard # To control the robot using keyboard

4.1.2 Autonomous Navigation in the saved map

ros2 launch tortoisebotpro_bringup autobringup.launch use_sim_time:=True exploration:=False # To launch robot in sim with a saved map

4.2 Actual Robot

Note

For every command to be executed within the robot a new SSH connection needs to be established.

4.2.1 Map Generation

ros2 launch tortoisebotpro_bringup autobringup.launch use_sim_time:=False exploration:=True # To launch real robot in without a saved map
ros2 run teleop_twist_keyboard teleop_twist_keyboard # If using computer keyboard to control the robot

4.2.2 Autonomous Navigation in the saved map

ros2 launch tortoisebotpro_bringup autobringup.launch use_sim_time:=False exploration:=False # To launch real robot in with a saved map

5. General Robot Information

Parameter Value
Wheel Separation Length 0.195m
Motor Type Planetary DC Geared Motor
RPM 110
Encoder Type Magnetic Encoder
PPR (Pulses Per Revolution) 420
Microcontroller DOIT-ESP32 Devkit V1
PC Used Intel NUC i3 10th Gen
Robot Payload Capacity 15 kgs
Battery Life About 1.5 hours
Battery Type Lithium-ion 6-cell, 22.2V

5.1 Topic Description

Topic Description
/bat_per Battery percentage remaining until complete discharge
/bat_voltage Battery voltage
/cmd_vel Command velocity for the robot
/diagnostics Diagnostics messages
/heading Robot heading based on magnetometer
/imu/data IMU data including orientation, rotational velocities and linear acceleration
/wheel/ticks Encoder reading of wheels in an array of the format of [left, right]
/wheel/vel Wheel velocities in an array of the format of [left, right]
/odom Odometry generated from wheel encoders
/pid/constants Set PID constants
/pid/control Should PID be used or not
/scan Lidar measurements
/usb_cam Cascaded topics providing complete information about the camera
/diagnostics/test Run diagnostics on the robot

5.2 Battery

Within the robot a buzzer beeps to indicate the status of battery.

Battery Level Beeps Status
100 % to 20 % No beeps
20 % to 15 % Beeps after every 2 mins
15 % to 10 % Beeps after every 1 min
10 % to 0 % Continuous Beeps

Caution

Do not drain the battery below 10 %, doing so will damage the battery permanently. Maximum battery voltage is 25.2V and minimum usable battery voltage is 19.8V

A battery is made available on the robot which indicate the status of the battery so that you don't have to echo on topics. Every bar on the indicator indicates 25% battery health. So,

Bar Level Battery Level
1 0 % to 25 %
2 25 % to 50 %
3 50 % to 75 %
4 75 % to 100 %

5.3 Robot Velocities

Maximum Linear Velocity - 0.37 m s-1
Maximum Angular Velocity - 3.836 rad s-1

5.4 USB Ports

A strict rule needs to be followed while connecting Lidar, ESP32 and USB camera. These ports are hardcoded and devices needs to be connected as depicted below.

⚠️ 6. USB Port Configuration for ESP and LiDAR

To ensure consistent port names for the ESP and LiDAR devices across reboots and plug-in orders, we assign static USB names using udev rules. Follow the steps below carefully and only on the robot's NUC via SSH.

Important

This setup ensures your ESP and LiDAR always map to /dev/esp and /dev/lidar, respectively. This is necessary because the launch files in the repository are already configured to use these port names. If not set correctly, the robot will fail to communicate with the microcontroller or the LiDAR.


Step-by-step Instructions

✅ Step 1: Connect the ESP to the NUC

Plug the ESP device into the NUC using the USB port.

Check the device path:

ls /dev/ttyUSB*

It should show something like:

/dev/ttyUSB0

Now identify the USB ID:

udevadm info --name=/dev/ttyUSB0 --attribute-walk | grep KERNELS

You will see an output like this:

ATTRS{...}
KERNELS=="1-1"
ATTRS{...}

Note

Note down the line with KERNELS=="...". This identifies the USB path for the ESP. In this example, it is: KERNELS=="1-1"


✅ Step 2: Connect the LiDAR to the NUC

Now plug the LiDAR (e.g., YD LiDAR) into another USB port.

Again check the device path:

ls /dev/ttyUSB*

Now you'll see:

/dev/ttyUSB0  /dev/ttyUSB1

(Assuming the ESP is still connected as /dev/ttyUSB0, the new one /dev/ttyUSB1 is the LiDAR.)

Now run:

udevadm info --name=/dev/ttyUSB1 --attribute-walk | grep KERNELS

You'll get an output like:

ATTRS{...}
KERNELS=="1-2"
ATTRS{...}

Note

Again, note down the line with KERNELS=="...". In this example: KERNELS=="1-2"


✅ Step 3: Edit the install.sh File

Now, open the file:

cd ~/ros2_ws/src/tortoisebot_pro-ros2-humble

Edit the install.sh script. Replace the values in the following lines with what you got in Steps 1 and 2:

SUBSYSTEM=="tty", KERNELS=="1-2", SYMLINK+="esp"
SUBSYSTEM=="tty", KERNELS=="1-1", SYMLINK+="lidar"

For example, if:

  • ESP → KERNELS=="1-1"
  • LiDAR → KERNELS=="1-2"

Then your lines should be:

SUBSYSTEM=="tty", KERNELS=="1-1", SYMLINK+="esp"
SUBSYSTEM=="tty", KERNELS=="1-2", SYMLINK+="lidar"

Save the file.

Now make it executable and run it:

chmod +x install.sh
./install.sh

You should see:

USB Ports configured!..

This sets up the udev rules and reloads them.


⚠️ Final Steps: Update Launch and Config Files

Now that the ports are set, make sure the port names in your launch/config files are correct.

Check and ensure:

1. For ESP (micro-ROS firmware):

tortoisebotpro_firmware/launch/micro_ros.launch.py

Set the serial device to:

/dev/esp

2. For LiDAR:

ydlidar_ros2_driver/params/ydlidar.params

Set the port to:

/dev/lidar

⚠️ Disclaimer

Warning

This step involves modifying system-level USB rules. Please do it carefully and only on the NUC's SSH terminal. Misconfiguration can prevent your robot from detecting the ESP or LiDAR correctly. Make sure the values for KERNELS==... are correct and mapped to the correct devices.


Let us know if you face any issues with this step!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors