UnitySim is a simulation environment for underwater robotics, created to test out autonomous algorithms before they are deployed on real vehicles. It is developed by Mecatron to simulate AUV competitions such as the Singapore AUV Challenge and RoboSub. Support is also added for manual control of the vehicle by keyboard and external controllers (in this case is F370 gamepad).
UnitySim supports the majority of common underwater sensors:
- IMU
- Depth sensor
- Camera
- Sonar
- DVL
- Pose (for ground truth)
UnitySim also has actuators which are specifically designed for Mecatron's AUV, for SAUVC and RoboSub competitions:
- 2-DOF robotic arm with gripper
- Torpedo launcher
- Marker dropper
Vehicle control can be done with:
- Keyboard
- F370 gamepad
- ROS
Thanks to the packages ROS-TCP-Connector
and ROS-TCP-Endpoint
developed by Unity Technologies, UnitySim can communicate with ROS. This allows for the publishing of sensor data to ROS and the receiving of control commands from ROS.
As Unity and ROS communicate over TCP-IP, the simulation can be run on a separate machine from the ROS system. This allows for the simulation to be run on a powerful machine while the ROS system can be run on a low-power machine, as long as they are connected to the same local network.
In the foreseeable future, the following features will be added:
- Create a gripper that can realistically open and close (as of now picking up of objects is done through FixedJoint)
- Add more props for RoboSub. As of now, the scene is designed for SAUVC.
Long term work:
- Replace Rigidbody with ArticulationBody for better physics simulation
- Make the scene photorealistic with HDRI sky and other settings
Author: Tien Luc Vu (Mecatron Underwater Robotics, NTUsg)
The project has already installed the following Unity packages and would like to thank the authors of these packages:
-
Unity package used for simulating water graphics: Crest Water 4 HDRP.
-
Unity package used for water physics simulation (even though the project does not use much of it): Dynamic Water Physics 2
Note:
Crest Water 4 HDRP
andDynamic Water Physics 2
are charged assets in the Unity Asset Store. The project has purchased these assets and used them in the simulation. As such, you are not allowed to circulate this project without permission.
Many of the scripts of this project are inspired by and modified from these two packages. The author would like to thank the authors of these packages making them open-source.
- MARUSSimulator. The project is originally a clone of MARUSimulator, but it has been heavily modified to suit the needs of Mecatron.
- Robotics-Nav2-SLAM-Example. Scripts such as Clock and ROS Clock Publisher are borrowed from this package.
On the local ROS side, the following package is used: