Skip to content

CRTA-Lab/ASTRO_setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

Astro Robot Setup


Part 1 — Robot (Jetson Nano): Docker Setup

1. Clone the repository

git clone <repo-url> ~/ASTRO_setup
cd ~/ASTRO_setup/astro_docker

2. Build the Docker image

Standard build (uses cache if available):

./docker_ros_build.sh

Clean build — use this if you hit GPG key errors, stale layers, or after major Dockerfile changes:

docker build --no-cache --pull -t astro_image .

--pull fetches the latest ros:humble-perception base image. --no-cache forces every layer to rebuild from scratch.

3. Run the container

Starts the hardware stack in the background. The container auto-restarts on crash or Jetson reboot.

./run_docker_ros.sh

Check it started correctly:

docker logs -f astro_hw

4. Open a debug shell

Attach to the running container (same live environment, same ROS topics):

./docker_ros_debug.sh

Start a fresh standalone container instead (useful when the main container isn't running):

./docker_ros_debug.sh --new

5. Stop and remove containers

Stop only Astro containers (astro_hw and astro_debug):

./kill_containers.sh

Stop every container on the system:

./kill_containers.sh --all

Part 2 — PC Setup — ROS 2 Humble + Zenoh

Instructions for connecting your PC to a robot over WiFi using ROS 2 Humble with rmw_zenoh middleware.

Overview

Each PC connects directly to its assigned robot in client mode. Each pair is completely isolated using a unique ROS_DOMAIN_ID.

Pair ROS_DOMAIN_ID Robot IP
1 1 192.168.0.11
2 2 192.168.0.12
3 3 192.168.0.13
4 4 192.168.0.14
5 5 192.168.0.15

1. Install

sudo apt update
sudo apt install ros-humble-rmw-zenoh-cpp ros-humble-image-transport-plugins

Verify:

source /opt/ros/humble/setup.bash
ros2 pkg list | grep rmw_zenoh

2. Connect to Your Robot

Replace <N> with your pair number and <ROBOT_IP> with the matching IP from the table above.

source /opt/ros/humble/setup.bash
export RMW_IMPLEMENTATION=rmw_zenoh_cpp
export ROS_DOMAIN_ID=<N>
export ZENOH_CONFIG_OVERRIDE='mode="client";connect/endpoints=["tcp/<ROBOT_IP>:7447"]'

Example for PC-3 (Robot 3):

source /opt/ros/humble/setup.bash
export RMW_IMPLEMENTATION=rmw_zenoh_cpp
export ROS_DOMAIN_ID=3
export ZENOH_CONFIG_OVERRIDE='mode="client";connect/endpoints=["tcp/192.168.0.13:7447"]'

3. Make It Permanent (Optional)

To avoid typing the exports every time you open a new terminal, add them to your ~/.bashrc. Replace <N> and <ROBOT_IP> with your actual values.

echo "source /opt/ros/humble/setup.bash" >> ~/.bashrc
echo "export RMW_IMPLEMENTATION=rmw_zenoh_cpp" >> ~/.bashrc
echo "export ROS_DOMAIN_ID=<N>" >> ~/.bashrc
echo "export ZENOH_CONFIG_OVERRIDE='mode=\"client\";connect/endpoints=[\"tcp/<ROBOT_IP>:7447\"]'" >> ~/.bashrc

Example for PC-3 (Robot 3):

echo "source /opt/ros/humble/setup.bash" >> ~/.bashrc
echo "export RMW_IMPLEMENTATION=rmw_zenoh_cpp" >> ~/.bashrc
echo "export ROS_DOMAIN_ID=3" >> ~/.bashrc
echo "export ZENOH_CONFIG_OVERRIDE='mode=\"client\";connect/endpoints=[\"tcp/192.168.0.13:7447\"]'" >> ~/.bashrc

Then reload:

source ~/.bashrc

Note: If you need to switch robots, edit ~/.bashrc and change the ROS_DOMAIN_ID and IP, then run source ~/.bashrc and ros2 daemon stop.

4. Verify Connection

ros2 daemon stop
ros2 topic list

Important: Always run ros2 daemon stop after setting the Zenoh environment variables. The ROS 2 daemon caches graph info and will not see the robot's topics if it started before you set ZENOH_CONFIG_OVERRIDE. Alternatively use ros2 topic list --no-daemon.

5. View Compressed Camera Image

ros2 run rqt_image_view rqt_image_view

Select the /compressed variant of your camera topic from the dropdown.

6. Troubleshooting

Can't see any topics

  1. Ping the robot: ping <ROBOT_IP> — if this fails, it's a WiFi/network issue.
  2. Check port is reachable: nc -zv <ROBOT_IP> 7447 — should say "succeeded".
  3. Kill the ROS 2 daemon: ros2 daemon stop then try ros2 topic list again.
  4. Check RMW: Every terminal must have export RMW_IMPLEMENTATION=rmw_zenoh_cpp. Verify with echo $RMW_IMPLEMENTATION.
  5. Check domain ID: Run echo $ROS_DOMAIN_ID — must match your robot pair number.

Topics show up but no data

  1. RMW version mismatch: Run dpkg -l | grep rmw-zenoh on your PC and compare with the robot — versions must match.

rviz2 shows TypeHashNotSupported errors

This is not a real error. Suppress with:

ros2 run rviz2 rviz2 --ros-args --log-level WARN

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors