Skip to content

IAMJAI1510/ECE470-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ECE470-Project

Aquatic Illini

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.

Installing the simulator

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:

  1. Simply clone this repo into your ~/workspace/src, under the name boat_control.
  2. 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

  1. run source /opt/ros/galactic/setup.sh. If you get a message regarding another ros version set up, run the previous command again.
  2. ros2 launch mbzirc_ros competition_local.launch.py ign_args:="-v 4 -r test/simple_arm_demo.sdf"
  3. 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_gripper
  4. ros2 run joy joy_node
  5. ros2 run boat_control joyctl
  6. 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:

  1. Create a launch file for the joy demo
  2. Waypoint navigation with ground truth coordinates

Inverse Kinematic Equations (y,z) -> (θ01):

[Note: L = 0.75, H = $\sqrt(y^2 + z^2)$]

  1. θ0 = $\sin^-1(z/H) + cos^-1(H/(2L))$
  2. θ1 = $\pi/2 + sin^-1(z/H) - cos^-1(H/(2L))$

Setting up the simulator

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.

Sea state

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

  1. cd src/mbzirc/mbzirc_ign/scripts
  2. python3 set_sea_state.py --sea-state 0
  3. colcon build --merge-install --cmake-clean-cache --packages-select mbzirc_ign

Running the final demo

  1. run source /opt/ros/galactic/setup.sh. If you get a message regarding another ros version set up, run the previous command again.
  2. ros2 launch mbzirc_ros competition_local.launch.py ign_args:="-v 4 -r test/simple_arm_demo.sdf"
  3. 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_gripper
  4. ros2 run boat_control odom

About

MBZIRC Simulation Environment for USV

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors