Skip to content

Wiktor-99/mobile_robots_playground

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mobile robots playground

pre-commit

Repo contains experiments with mobile robots. Currently repo contains:

  • Nav 2 support
  • Simple Diff drive robot simulation with:
    • Lidar slam
    • RGLGazeboPlugin
  • Visual odometry
  • Tracked vehicle simulation

How to set up

Clone repo with submodules:

  • git clone --recurse-submodules

To run in devcontainer you need to:

  1. Download NVidia OptiX 7.2.
  2. Add following to .bashrc export OptiX_INSTALL_DIR=<your-OptiX-path>.
  3. Open repo in the devcontainer via vscode .with devcontainer plugin.
  4. Run following commands.
colcon build && source install/setup.bash

export GZ_SIM_SYSTEM_PLUGIN_PATH=`pwd`/install/RGLGazeboPlugin/RGLServerPlugin:$GZ_SIM_SYSTEM_PLUGIN_PATH
export GZ_GUI_PLUGIN_PATH=`pwd`/install/RGLGazeboPlugin/RGLVisualize:$GZ_GUI_PLUGIN_PATH

Nav 2

To start Nav 2 just run

ros2 launch diffdrive_bringup diffdrive_bringup.launch.py use_nav2:=True

Results of mapping with nav2

Nav2 map

How to run diffdrive simulation with lidar slam

In the first terminal run:

ros2 launch diffdrive_bringup diffdrive_bringup.launch.py use_lidar_slam:=True

With nvidia (applies to all of the bringup command):

__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia ros2 launch diffdrive_bringup diffdrive_bringup.launch.py use_lidar_slam:=True

In the third terminal:

ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args -p stamped:=True

To save the map use:

ros2 service call /map_save std_srvs/Empty

Results of mapping with lidar slam

Input point cloud from the RGLPlugin The map

Visual odometry

Start simulation:

ros2 launch diffdrive_bringup diffdrive_bringup.launch.py

Then start the visual odom script:

python3 src/algorithms/algorithms/stereo_cameras.py

New frame dom_vis will be available.

How to run tracked vehicle simulation

Just build the whole project or following packages with packages-select option:

  • tracked_vehicle_interfaces
  • tracked_vehicle_simulation
  • tracks_controller

Run simulation with

ros2 launch tracked_vehicle_simulation tracked_vehicle_bringup.launch.py

Tracked vehicle simulation

Tracked vehicle simulation

Releases

No releases published

Packages

No packages published