This repository contains the ROS 2 packages and configurations for the Titan Robot, including robot bringup, SLAM-based mapping, and localization using slam_toolbox and nav2.
sudo apt update && sudo apt upgrade -ysudo apt install -y \
curl \
wget \
htop \
net-tools \
openssh-server \
rsync \
tmux-
Create the ROS 2 workspace and source folder:
mkdir -p ~/titan_ws/src cd ~/titan_ws/src
-
Clone the Titan Robot repository:
git clone https://github.com/MRS111-OS/titan_robot.git
-
Build the workspace:
cd ~/titan_ws colcon build
-
Source the workspace:
source install/setup.bash
To start the robot with all required nodes:
ros2 launch titan_bringup titan_bringup.launch.pyThis will launch:
- Robot URDF
- RViz2
- Joint State Publisher
- LIDAR driver
- ESP32 communication node
-
Launch the Nav2 bringup:
ros2 launch nav2_bringup navigation_launch.py
-
In a new terminal, launch SLAM Toolbox in async mapping mode:
ros2 launch slam_toolbox online_async_launch.py
-
In another terminal, control the robot with teleop:
ros2 run teleop_twist_keyboard teleop_twist_keyboard
-
Save the map using RViz2:
- In Rviz2, go to Panels > Add New Panel > Choose SlamToolboxPlugin
- Enter your map name beside save map and serialize map
- Click Save Map and Serialize Map
-
Stop the SLAM Toolbox launch file.
-
Edit the SLAM config for localization:
cd ~/titan_ws/src/titan_robot/slam_toolbox/config
-
Modify
mapper_params_online_async.yaml:- Comment out:
# mode: mapping - Uncomment and set:
mode: localization map_file_name: "/absolute/path/to/your/map.yaml" map_start_at_dock: true
- Comment out:
-
Launch SLAM Toolbox in localization mode:
ros2 launch slam_toolbox online_async_launch.py
-
In RViz2:
- Click the 2D Goal Pose tool
- Click a point on the map to send the robot to that goal
To find the IP addresses of devices (such as your robot) on your local network, use nmap:
-
Install nmap (if needed):
sudo apt update sudo apt install nmap
-
Scan your network (replace subnet if needed):
sudo nmap -sn 192.168.127.0/25 # OR sudo nmap -sn 192.168.127.0/24You should pick the IP address corresponding to
MAC ADDRESS:D8:3A:DD:46:FC:C3This will list all active devices in the range. Look for your robot's IP in the output.
Tip: You may need
sudofor full results.