This repository contains code for ROS2 development with the LIMO robot. Please note that:
Since the onboard computer equipped on the LIMO robot is Nvidia Jetson Nano which only works with Jetpack v4.x (Ubuntu 18.04), there is no easy way to do native development with an active ROS2 LTS release on the robot (REP2000). Thus the packages within this repository are developed and only tested in a ROS Humble Docker container (docker image: westonrobot/limo_ros:humble).
You can set up the development environment either on the Jetson Nano or your desktop/laptop PC. The steps for the setup are the same:
$ git clone https://github.com/westonrobot/limo_ros2.git
$ cd limo_ros2
Install VS Code with Remote Development Plugins
Start development inside the container If you're developing on the LIMO directly:
If you're developing remotely from your PC:
Latest image: westonrobot/limo_ros:humble_22082023
You can find more information about development inside containers here
Once you're inside the container, the commands to build or launch ROS packages are the same as those in a native environment:
Build the colcon workspace
# in workspace root
./build.sh
# Remember to always source ros workspace on new terminal
. install/setup.bash
Bringup robot
# Bringup robot
ros2 launch limo_bringup limo_start.launch.py
# OR
# Bringup robot in simulator
# Add use_sim_time:=true argument for subsequent launches if using sim
ros2 launch limo_gazebosim limo_gazebo_diff.launch.py
Bringup camera
ros2 launch astra_camera dabai.launch.py
Teleoperation
ros2 run teleop_twist_keyboard teleop_twist_keyboard
SLAM
# Launch SLAM node
ros2 launch limo_bringup cartographer.launch.py
# To save map
ros2 run nav2_map_server map_saver_cli -f [filename]
Navigation
# In seperate terminals
ros2 launch limo_navigation limo_localization.launch.py
ros2 launch limo_navigation limo_controller.launch.py
# Single launch
ros2 launch limo_navigation limo_navigation.launch.py
Note: Limo container is running on cyclone DDS, you need to set the following environment variable
# Install package
sudo apt install ros-humble-rmw-cyclonedds-cpp
# Export environment variable
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
Sample gazebo and navigation are provided for differential motion model in the repo, to use them
* Clone the repo into your local pc
* Feel free to use provided Dockerfile as a reference
* Rebuild new container for local PC
To get display out of docker and on the LIMO screen;
On the host machine, allow all connections with:
xhost +
On the docker machine:
# export the display
export DISPLAY=:0
Note: Tested on Ubuntu 22 (POP) and Jetpack 4.6 w/docker
To get over the permission error, WITH THE CAMERA UNPLUGGED
cd limo_ros2/src/ros2_astra_camera/astra_camera/scripts
sudo cp 56-orbbec-usb.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules
This example rviz workspace has everything working.
ros@agilex:/workspaces/limo_ros2/src/ros2_astra_camera/astra_camera/rviz$ rviz2 -d pointcloud.rviz
In addition to the steps above regarding udev rules and exporting the displays;
Remote into the LIMO DevContainer
Launch the LIMO Base
ros@agilex:/workspaces/limo_ros2$ ros2 launch limo_bringup limo_start.launch.py
Bringup the Camera
ros2 launch astra_camera dabai.launch.py
Run the provided rviz2 configuration
rviz2 -d src/ros2_astra_camera/astra_camera/rviz/pointcloud.rviz
Run Teleop
ros2 run teleop_twist_keyboard teleop_twist_keyboard
At this point a ros2 topic list
gives;
os@agilex:/workspaces/limo_ros2/$ ros2 topic list
/camera/color/camera_info
/camera/color/image_raw
/camera/color/image_raw/compressed
/camera/color/image_raw/compressedDepth
/camera/color/image_raw/theora
/camera/depth/camera_info
/camera/depth/color/points
/camera/depth/image_raw
/camera/depth/image_raw/compressed
/camera/depth/image_raw/compressedDepth
/camera/depth/image_raw/theora
/camera/depth/points
/camera/extrinsic/depth_to_color
/camera/ir/camera_info
/camera/ir/image_raw
/camera/ir/image_raw/compressed
/camera/ir/image_raw/compressedDepth
/camera/ir/image_raw/theora
/cmd_vel
/imu
/joint_states
/limo_status
/odom
/parameter_events
/robot_description
/rosout
/scan
/tf
/tf_static
/ydlidar_ros2_driver_node/transition_event
Notes.
To Do:
source install/setup.bash
to bashrc fileAs a warning with the main bringup file
ydlidar_ros2_driver_node-4] [WARN] [1695551352.042005881] [ydlidar_ros2_driver_node]: New subscription discovered on topic '/scan', requesting incompatible QoS. No messages will be sent to it. Last incompatible policy: RELIABILITY_QOS_POLICY
Got the same sort of warning when connecting to the camera
[WARN] [1695553761.805006031] [rviz]: New publisher discovered on topic '/camera/depth/image_raw', offering incompatible QoS. No messages will be sent to it. Last incompatible policy: RELIABILITY_QOS_POLICY
[SOLVED] - https://github.com/ros-visualization/rqt/issues/187#issuecomment-810105698