dd_robot_10.mp4
- Robot simulation in a indoor environment in Gazebo Harmonic
- Navigation (using Nav2 Stack) from Point A to Point B, using "Nav2goal" feature from Nav2 stack
- Docker file included
- Ubuntu 24.04
- ROS 2 Jazzy Jalisco
- Gazebo Sim Harmonic
- Nav2 Stack
- Git clone the repo for SImulation in Gazebo
NOTE: Replace ros2_ws/with your own folder
cd ~/ros2_ws/src
git clone https://github.com/RB0609/differential_drive.git- Build the Workspace
cd ~/ros2_ws
colcon build
source install/setup.bash- Launch file in Gazebo and Rviz
ros2 launch dd_robot display.launch.pyIn nav2_params.yaml file which is in config folder.
dd_robot/
└── config/
└── nav2_params.yaml
map_server:
ros__parameters:
use_sim_time: true
yaml_filename: "<path_to_file location>/map.yaml" #Here choose your own folder, where you store "map.yaml" file
#topic_name: "map"
#frame_id: "map"in Terminal1:(First launch this file)
ros2 launch nav2_bringup rviz_launch.py For below code, careful with file location
map:=<path_to_file_location>/map.yaml
params_file:=<path_to_file_location>/nav2_params.yaml
below is the example usage
in Terminal2:
ros2 launch nav2_bringup bringup_launch.py use_sim_time:=true map:=/home/rakesh/map.yaml params_file:=/home/rakesh/ros2_ws/src/differential_drive/dd_robot/config/nav2_params.yaml- OS: Linux with a graphical desktop (X11)
- Docker installed and running
You do not need ROS 2 installed on the host.
git clone https://github.com/RB0609/differential_drive.git
cd differential_drive # this should contain the Dockerfile and src/From the repo root where the Dokcerfile is:
docker build -t differential_drive_jazzy .On the host (not inside Docker), allow Docker to access your X server:
xhost +local:dockerThen start the container:
docker run -it \
--name dd_container \
--net=host \
-e DISPLAY=$DISPLAY \
-e QT_X11_NO_MITSHM=1 \
-e LIBGL_ALWAYS_SOFTWARE=1 \
-v /tmp/.X11-unix:/tmp/.X11-unix:rw \
differential_drive_jazzyYou’ll get a shell inside the container:
root@<container-id>:/ros2_ws#Inside the container:
ros2 launch dd_robot display.launch.pyYou can open as many extra shells as you want in the same running container.
On the host, in a new terminal:
docker exec -it dd_container bashInside that new shell, you can run:
ros2 topic list
ros2 topic echo /odom
ros2 node list- Plan to Include Turtlebot3 waffle model
- Working on Sim2Real