Firstly, we want to run build_n_run.sh (docker), or native.sh for Ubuntu-based distributions, and exit when it's done.
$ sh build_n_run.sh && exit
2.1 To initialize the docker (after a boot,reboot, etc), we must give it initially display permissions.
$ xhost +
2.2 After that, we will start the docker container, then open it (execute):
$ docker start ros_humble
$ docker exec -ti ros_humble bash
wget - o - https://raw.githubusercontent.com/Joao8bit/ros2_docker_rtabmap/refs/heads/jazzy/native.sh | bash && sh native.sh
source ~/ros_ws/install/setup.bash
colcon build
ros2 launch leo_gz_bringup leo_gz.launch.py sim_world:=~/ros_ws/src/leo_simulator-ros2/leo_gz_worlds/worlds/lunalab2024.sdf
ros2 launch rtabmap_livox rtabmap_livox.launch.py
rviz2
ros2 launch leo_teleop key_teleop.launch.xml
ros2 launch leo_teleop joy_teleop.launch.xml #joy_dev:=/dev/input/jsX to choose joystick
alias luna_source='source ~/ros_ws/install/setup.bash'
alias luna_gazebo='ros2 launch leo_gz_bringup leo_gz.launch.py sim_world:=~/ros_ws/src/leo_simulator-ros2/leo_gz_worlds/worlds/lunalab2024.sdf'
alias luna_rtabmap='ros2 launch rtabmap_livox rtabmap_livox.launch.py'
alias joy_teleop='ros2 launch leo_teleop joy_teleop.launch.xml'
alias key_teleop='ros2 launch leo_teleop key_teleop.launch.xml'
- Run the 'docker exec -ti ros_humble bash' command again.
- Run the commands from section 2 of this README.
- Exit the docker, and try running the 'xhost +' command again, it should fix things.
- Exit the docker and stop it using:
$ docker stop ros_humble
Any other related questions please let me know privately or in the common communications chat!
A migration to the latest LTS ROS2 version Jazzy is now complete, feel free to try out the Docker version or even natively.