May 17, 2024

The Heron USV software program has been present process plenty of notable updates just lately. One of many adjustments is a brand new simulator which makes use of Gazebo software program. The management scheme and sensor processing on the simulated heron is carried out in the identical method on the precise Heron, that means that any program run on the Heron may also be run on the simulator and vice versa.

So how does this work? The simulator depends on the UUV Simulator software program bundle to compute the Heron’s water physics. This software program bundle contains a wide range of options together with damping and buoyancy pressure computation, water currents, and quite a few sensors usually utilized in aquatic robotics. The simulated Heron comes with a GPS, front-facing laser, and an IMU by default and might help many different sensors, together with sonars and cameras. Bigger sensors, like a 2D LiDAR or a digital camera, are added to the robotic mannequin, together with the sensor within the visualizations and physics calculations.

The simulator comes geared up with a set of pre-made terrains on which to check the Heron, together with a lake, island, ocean, and harbour. Customized terrains are additionally supported, solely requiring a 3D file representing the seabed and the shoreline.

The Heron will be managed utilizing the RViz visualization software program, the identical method that different Clearpath robots are managed. To permit for fleets of Herons, the simulator helps the simultaneous management and visualization of a number of vessels. Every particular Heron individually maintains its sensor and placement processing (as in the actual world) however they’re sufficiently related to be visualized collectively.

On this tutorial we’ll undergo the steps wanted to have the ability to see your Heron in Gazebo and transfer it round utilizing rviz.

Set up

First, guarantee you’ve gotten a working set up of ROS and Gazebo 7. You probably have ROS Kinetic, Gazebo 7 ought to already be put in. Nevertheless you probably have ROS Indigo, chances are you’ll must run the next command:

sudo apt-get set up ros-indigo-gazebo7*

Subsequent, set up the next packages wanted for the simulation: uuv_simulator, heron, and heron_controller. This may be executed by going to the src folder in your catkin workspace, and cloning the packages from github. Be certain that the department you might be cloning from github matches the ROS distribution you’ve gotten in your laptop, reminiscent of kinetic or indigo:

cd ~/catkin_ws/src
git clone https://github.com/uuvsimulator/uuv_simulator
git clone https://github.com/heron/heron
git clone https://github.com/heron/heron_controller

Whereas nonetheless within the src folder, set up the heron_simulator bundle by operating:

git clone https://github.com/heron/heron_simulator
cd ..
rosdep set up --from-paths src --ignore-src --rosdistro=kinetic -yr

The next packages will be put in utilizing the sudo apt-get command: heron_desktop, imu_tools.

sudo apt-get set up ros-kinetic-heron-desktop
sudo apt-get set up ros-kinetic-imu-tools

Lastly, run the instructions to construct your workspace, and also you’re able to go:

cd ..
catkin_make
supply devel/setup.bash

Launching Gazebo

Gazebo is used to simulate your Heron on the planet, and contains approximations of its physics reminiscent of its buoyancy and inertia. To simulate Heron in Gazebo, run:

roslaunch heron_gazebo heron_world.launch

You need to see a Gazebo window open displaying a Heron within the ocean, just like this:

Utilizing Rviz

Rviz is used to point out your robotic’s notion of the world. You need to use it to control your Heron each in Gazebo and in actual life. To launch your robotic in rviz, use:

roslaunch heron_viz view_robot.launch

An rviz window containing your heron ought to seem, as proven:

The arrows across the Heron are interactive markers, and can be utilized to maneuver the Heron round. If these aren’t seen whenever you open rviz, click on on the “Work together” possibility on the highest left of the window. To maneuver the Heron, click on and drag the marker within the route of the arrow. To vary instructions, click on and rotate the blue circle across the Heron. Watch your Heron in Gazebo as you progress it in rviz, it needs to be transferring in Gazebo as properly!

Subsequent Steps

Take a look at the README.md file situated within the heron_simulator bundle for extra particulars on what else you are able to do with the Heron in Gazebo and rviz. You may learn to launch Heron in Gazebo with totally different environments reminiscent of a lake or shipwreck, learn in regards to the hydrodynamic forces appearing on Heron, and extra.

To study extra in regards to the Heron USV, click on the banner under. Subscribe to our publication for extra updates on all issues robots!