Skip to content

UNF ROS 2 implementation for Research and Development, and Osprey Robotics Club NASA Lunabotics Remote Mining Competition Robots

License

Notifications You must be signed in to change notification settings

Osprey-Robotics/osprey_ros

Repository files navigation

Osprey ROS

This project is the University of North Florida's Osprey Robotics Club ROS implementation for their NASA Lunabotics Remote Mining Competition Robots, past, present, and future.

Environment Preparation

The following assumes you have installed all the necessary ROS 2 Iron packages, and have sourced the installation before running any ros2 commands.

source /opt/ros/iron/setup.bash

You may want to have your development user environment do this on login via ~/.bashrc file; add that command to the end of that file.

Its recommended to have a ros2 workspace in a user directory for development purposes, to build this project, etc; ex ~/ros2_ws/. The following will refer to that directory, and directories created within.

Download

Download and unpack or clone this repositories contents into your ros2 workspace; ex ~/ros2_ws/src/osprey_ros.

Build and Install

Building is done using colcon which will invoke cmake and run the necessary commands. Run the following command in your ros2 workspace; ex ~/ros2_ws/.

colcon build --symlink-install --packages-select  osprey_ros

Source install

Make sure to run the following command after install and login. Run the following command in your ros2 workspace; ex ~/ros2_ws/.

source install/setup.bash

You may want to have your development user environment do this on login via ~/.bashrc file; add the following to the end of that file.

source ~/ros2_ws/install/setup.bash

Docker Development Environment

Two docker development environments are available for portable development and simulation. This requires docker to be installed on either Linux or Windows; Windows is untested. Of the two options, most will use the second option, the first will primarily be used within this repository for CI. Instructions for usage is provide within each of the respective repositories readme.

docker-ros2-iron image

The first environment is the docker-ros2-iron image, which contains the base headless environment and minimum packages needed to build and run opsrey_ros package.

docker-ros2-iron-gz-rviz2 image

The first environment is the docker-ros2-iron-gz-rviz2 image, which uses and builds on the previous base image with packages for graphical simulation, gazebo and rviz2. This is the primary image most will want to use for simulation testing of the robot and/or sensors.

Run

There are two ways to run osprey_ros, either on the actual robot hardware or using simulated robot hardware. Either will work in simulation, but one will only run on the robot itself, the simulation can be run in the docker images or any ROS 2 Iron environment.

Running on the Physical Robot

To run on the actual hardware run the following command in your ros2 workspace; ex ~/ros2_ws/.

# 2024 Robot
ros2 launch osprey_ros osprey_ros.launch.py year:=24

# 2022 Robot
ros2 launch osprey_ros osprey_ros.launch.py

Running a Simulated Robot

To run on simulated hardware run the following command in your ros2 workspace; ex ~/ros2_ws/.

# 2024 Robot
ros2 launch osprey_ros osprey_ros.launch.py sim:=true year:=24

# 2022 Robot
ros2 launch osprey_ros osprey_ros.launch.py sim:=true

Running Rviz2

Rviz2 is used to see what the robot sees, sensors, etc. To run the robot either physical, simulated, or via gazebo, start either, and then run the following command. The robot will not appear if you do not start osprey_ros first!

rviz2 -d src/osprey_ros/sim/robot.rviz

Running Gazebo

Gazebo is used to see what we see, how the robot operates in a simulated world, physical or simulated, start either, and then run the following command. This will launch a full instance of the robot, so do not run in addition to osprey_ros.

IGN Gazebo

# 2024 Robot
ros2 launch osprey_ros ign_gazebo.launch.py year:=24

# 2022 Robot
ros2 launch osprey_ros ign_gazebo.launch.py
Artemis Arena

Sample Artemis Arena

# 2024 Robot
ros2 launch osprey_ros ign_gazebo.launch.py world:=artemis_arena year:=24

# 2022 Robot
ros2 launch osprey_ros ign_gazebo.launch.py world:=artemis_arena

Robot Human Controllers

There are presently two ways to control the robot using teleop twist joy and keyboard

Remote operation

For remote operation over IP run the following commands on both systems prior to running ros launch files.

export ROS_MASTER_URI=<robot_ip>:12345
export ROS_IP=<robot_ip>

Gamepad

Run the following command to invoke the teleop manual joy controller for the gamepad.

ros2 launch osprey_ros gamepad.launch.py

Button Layout

Movement is done using the D-Pad and the X and Right Trigger button combinations. Press either X or Right Trigger, and then use the D-Pad to move forward, backward, and turn left and right. Picture of Logitech F310

Keyboard

Run the following command to invoke the controller for the keyboard, which will present a interface for controlling the robot in the same terminal the command is run within.

ros2 run teleop_twist_keyboard teleop_twist_keyboard

Credits

Credits and thanks for resources used in this repository, some code and/or project structure, go to the following:

About

UNF ROS 2 implementation for Research and Development, and Osprey Robotics Club NASA Lunabotics Remote Mining Competition Robots

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published