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-sim
To start Webots simulator run:
just start-webots-sim
To 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 up
Then, on the client device (AGX),
docker compose -f compose.sim.agx.yaml up
Then, once that is running, run rviz on the host:
docker compose -f compose.sim.host.rviz.yaml up
Note: if AGX keeps printing tf error, check if ros2 multicast works.
ros2 multicast receive
Open another terminal:
docker ps
docker exec -it <container_id> bash
ros2 multicast send
If no message is delivered, try running the docker image in host network mode:
docker compose -f compose.sim.agx_netmode-host.yaml up
To 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 (set0
to 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.