Ocean pollution has become a huge problem for marine life and large part of that problem has become the amount of litter that is in our ocean. This is the motivation behind this robot. Our roboboat is able to pick up packages of litter from one set location and drop them off in another using a boom style arm, a suction gripper and rotating dual thrusters.
In order to install the simulator follow the instructions on the mbzirc git repo. https://github.com/osrf/mbzirc
Officially the simulator supports ubuntu 20.04 and ROS2 galactic, however, it was able to run on ROS2 humble, with ubuntu 22.04
Installing this package:
- Simply clone this repo into your
~/workspace/src, under the name boat_control. - Build the boat control package with
colcon build --packages-select boat_control --merge-install
To run the simulator joystick demo:
In seperate terminals run each of the following commands
- run
source /opt/ros/galactic/setup.sh. If you get a message regarding another ros version set up, run the previous command again. ros2 launch mbzirc_ros competition_local.launch.py ign_args:="-v 4 -r test/simple_arm_demo.sdf"ros2 launch mbzirc_ign spawn.launch.py name:=usv world:=simple_demo model:=usv x:=12.75 y:=0 z:=0.3 R:=0 P:=0 Y:=1.571 arm:=mbzirc_simple_arm gripper:=mbzirc_suction_gripperros2 run joy joy_noderos2 run boat_control joyctl- You can now use any of the joysticks supported here https://index.ros.org/p/joy/ and you will be able to move the left and right thrusters
TODO:
- Create a launch file for the joy demo
- Waypoint navigation with ground truth coordinates
Inverse Kinematic Equations (y,z) -> (θ0,θ1):
[Note: L = 0.75, H =
- θ0 =
$\sin^-1(z/H) + cos^-1(H/(2L))$ - θ1 =
$\pi/2 + sin^-1(z/H) - cos^-1(H/(2L))$
To set up this environment we modified the existing demo are test included in the mbzirc original simulator. We have included this sdf file within within this repo although you will need to place it in the mbzirc_ign/worlds/test directory.
In order for us to be able to pick up a target we needed to calm the ocean waters since the waves would throw off our inverse kinematics. Information about how sea state works is included here https://en.wikipedia.org/wiki/Sea_state
cd src/mbzirc/mbzirc_ign/scriptspython3 set_sea_state.py --sea-state 0colcon build --merge-install --cmake-clean-cache --packages-select mbzirc_ign
- run
source /opt/ros/galactic/setup.sh. If you get a message regarding another ros version set up, run the previous command again. ros2 launch mbzirc_ros competition_local.launch.py ign_args:="-v 4 -r test/simple_arm_demo.sdf"ros2 launch mbzirc_ign spawn.launch.py name:=usv world:=simple_demo model:=usv x:=12.75 y:=0 z:=0.3 R:=0 P:=0 Y:=1.571 arm:=mbzirc_simple_arm gripper:=mbzirc_suction_gripperros2 run boat_control odom