Skip to content

itskalvik/ros_sgp_tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ros_sgp_tools

The ros_sgp_tools package provides a ROS2 companion package for the SGP-Tools python library that can be deployed on ArduPilot-based vehicles.

  • The package can be used to run online/adaptive IPP on ArduPilot based UGVs and ASVs.
  • The package can also be used with Gazebo/Ardupilot SITL.
  • To use our Docker container with the preconfigured development environment, please refer to the documentation here.

Image title

Running SGP-Tools Online/Adaptive IPP with Gazebo/ArduRover Simulator

Image title

Run the following commands in separate terminals:

  • Launch Gazebo with the AION R1 UGV:

    gz sim -v4 -r r1_rover_runway.sdf
    

    To simulate a BlueBoat refer to this documentation.

  • Launch ArduRover SITL:

    sim_vehicle.py -v Rover -f rover-skid --model JSON --add-param-file=$HOME/SITL_Models/Gazebo/config/r1_rover.param --console --map -N -l 35.30371178789218,-80.73099267294185,0.,0.
    

    Note:

    • Restart sim_vechile.py if you get the following message: paramftp: bad count
    • Ensure the MAV Console shows that the vehicle has a GPS lock before running the next command
    • Ensure the MAV Map shows the vehicle before running the next command
  • Launch the SGP-Tools Online/Adaptive IPP method:

    ros2 launch ros_sgp_tools single_robot.launch.py
    

Environment setup

  • To use our Docker container with the preconfigured development environment, please refer to the documentation here.

Alternatively, please follow the following instructions to configure the development envirnoment on your local machine.

  • Install ROS 2 Humble

    sudo apt install ros-humble-desktop
    echo "source /opt/ros/humble/setup.bash" >> ~/.bashrc
    source ~/.bashrc
    
  • Create a ROS 2 workspace

    mkdir -p ~/ros2_ws/src
    cd ~/ros2_ws/
    colcon build --symlink-install
    echo "source $HOME/ros2_ws/install/setup.bash" >> ~/.bashrc
    source ~/.bashrc
    
  • Install Gazebo Garden

  • Install ArduPilot SITL

  • Install ardupilot_gazebo

  • Get SITL_Models repo

  • Setup environment variables

    echo "export GZ_VERSION=garden" >> ~/.bashrc
    echo "export GZ_SIM_SYSTEM_PLUGIN_PATH=$HOME/ardupilot_gazebo/build:${GZ_SIM_SYSTEM_PLUGIN_PATH}" >> ~/.bashrc
    echo "export GZ_SIM_RESOURCE_PATH=$HOME/ardupilot_gazebo/models:$HOME/ardupilot_gazebo/worlds:$HOME/SITL_Models/Gazebo/models:$HOME/SITL_Models/Gazebo/worlds:$GZ_SIM_RESOURCE_PATH" >> ~/.bashrc
    

Package setup

  • Install apt dependencies
    sudo apt install ros-humble-mavros* ros-$ROS_DISTRO-cv-bridge
    
  • Install pip dependencies
    pip3 install -r requirements.txt
    
  • Clone repo and build package
    cd ~/ros2_ws/src
    git clone https://github.com/itskalvik/ros_sgp_tools.git
    cd ..
    colcon build --symlink-install