Based on Husarion's rosbot-autonomy docker images and instructions (https://github.com/husarion/rosbot-autonomy). This forked repo is to run them in simulation on PC and AGX.
Important
To run Gazebo or Webots Simulators you have to use computer with NVIDIA GPU and the NVIDIA Container Toolkit installed.
To start Gazebo simulator run:
just start-gazebo-simTo start Webots simulator run:
just start-webots-simTo instruct the robot to autonomously explore new areas and create a map (in "slam" mode) of [2D Goal Pose] in RViz. When SLAM is off, you can indicate the robot's current position by [2D Pose Estimate] button.
Make sure the AGX and the host PC are connected to the same network and the devices are pingable. Check dmesg and use ufw to ensure the devices can communicate with one another.
On the Simulation host PC:
docker compose -f compose.sim.host.gazebo.yaml upThen, on the client device (AGX),
docker compose -f compose.sim.agx.yaml upThen, once that is running, run rviz on the host:
docker compose -f compose.sim.host.rviz.yaml upNote: if AGX keeps printing tf error, check if ros2 multicast works.
ros2 multicast receiveOpen another terminal:
docker ps
docker exec -it <container_id> bash
ros2 multicast sendIf no message is delivered, try running the docker image in host network mode:
docker compose -f compose.sim.agx_netmode-host.yaml upTo ensure proper user configuration, review the content of the .env file and select the appropriate configuration (the default options should be suitable).
LIDAR_BAUDRATE- depend on mounted LiDAR,MECANUM- wheel type,SLAM- choose between mapping and localization modes,SAVE_MAP_PERIOD- period of time for autosave map (set0to disable),CONTROLLER- choose the navigation controller type,ROBOT_NAMESPACE- type your ROSbot device name the same as in Husarnet.
Important
The value of the ROBOT_NAMESPACE parameter in the .env file should be the same as the name of the Husarnet device.

