-
Run SLAM Toolbox:
ros2 launch slam_toolbox online_async_launch.py slam_params_file:=./src/robot_mobil/config/mapper_params_online_async.yaml use_sim_time:=true
Note: For mapping, use synchronous launch instead.
-
Launch Simulation in Gazebo:
ros2 launch robot_mobil launch_sim.launch.py world:=./src/robot_mobil/worlds/MapaSimulare.world
Note: Specified a custom world in the launch command.
-
Start RViz2:
rviz2 -d dev_ws/src/robot_mobil/config/main_bot.rviz
Note: Specified a custom config in the launch command.
-
Control Robot with Keyboard:
ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args -r /cmd_vel:=/diff_controller/cmd_vel_unstamped
-
Install Joystick Drivers:
sudo apt install joystick jstest-gtk evtest
-
Launch Joystick Control:
ros2 launch robot_mobil joystick.launch.py
Configured for Xbox Series X controller. For configuring another controller, use the
joy_tester
repo.
-
If you want to configure another joystick, install and use the
joy_tester
repo in your workspace:cd your_workspace git clone https://github.com/joshnewans/joy_tester.git colcon build --symlink-install
Ignore the deprecation warnings.
-
LIDAR Visualization:
- Toggle the
visualize
parameter inlidar.xacro
betweentrue/false
.
- Toggle the
-
RViz Visibility:
- For better camera visibility, uncheck the robot model, grid model, etc.
-
Important:
- Update Ubuntu OS and all ROS2 tools to the latest version.
- Perform a fresh rebuild of the project:
cd your_workspace rm -rf build install log colcon build --symlink-install