Git Product home page Git Product logo

asv_sim's Introduction

ASV Simulator

This package contains plugins and models for the simulation of surface vessels in Gazebo.

Dependencies

You will need a working installation of ROS and Gazebo in order to use this package. It has been tested with:

  • Gazebo version 9.4.1
  • ROS Melodic Morenia
  • OSX 10.11.6

Installation

Source your ROS installation and update the Gazebo plugin path:

# Source the ROS and Gazebo environment (add this to ~/.bash_profile)
$ source /opt/ros/melodic/setup.bash
$ source /usr/local/share/gazebo/setup.sh

Create and configure a catkin workspace, clone and build the repo:

# Create a catkin workspace 
$ mkdir -p <catkin_ws>/src

# Clone dependencies
$ cd <catkin_ws>/src
$ git clone https://github.com/srmainwaring/asv_wave_sim.git

# Clone this repo
$ git clone https://github.com/srmainwaring/asv_sim.git

# Configure and build
$ cd <catkin_ws>
$ catkin config --extend /opt/ros/melodic \
  --cmake-args -DCMAKE_CXX_STANDARD=14 -DCMAKE_BUILD_TYPE=RelWithDebInfo 
$ catkin build

# Source the workspace
$ source devel/setup.bash

# Update the Gazebo plugin path
$ export GAZEBO_PLUGIN_PATH=$(pwd)/devel/lib:$GAZEBO_PLUGIN_PATH

# Check the Gazebo environment variables
$ printenv |grep GAZEBO

Anemometer Sensor

AnemometerSensor to measure wind speed and direction.

Usage

Add the SDF for the sensor to a <link> element of your model.

<sensor name="anemometer_sensor" type="anemometer">
  <always_on>true</always_on>
  <update_rate>50</update_rate>
  <topic>anemometer</topic>
</sensor>

Published Topics

  1. ~/anemometer (gazebo::msgs::Param_V)
  • time (gazebo::msgs::Time)
    The simulation time of the observation.

  • true_wind (gazebo::msgs::Vector3d)
    The true wind at the link origin.

  • apparent_wind (gazebo::msgs::Vector3d)
    The apparent wind at the link origin (i.e. true wind adjusted for the link velocity).

Parameters

  1. <always_on> (bool, default: false)
    Standard <sensor> parameter. See SDF documentation for details.

  2. <update_rate> (double, default: 0)
    Standard <sensor> parameter. See SDF documentation for details.

  3. <topic> (string, default: ~/anemometer)
    Standard <sensor> parameter. See SDF documentation for details.

Anemometer Example

To run the example:

roslaunch asv_sim_gazebo anemometer_demo_world.launch verbose:=true

The launch file loads the RegisterSensorsPlugin system plugin using the parameter:

  <arg name="extra_gazebo_args" default="--server-plugin libRegisterSensorsPlugin.so" />

You should see a world containing a single block at the origin. The figure below shows the block falling to demonstate the effect of motion on apparent wind:

Anemometer World

Open the Topic Visualization window and select the anemometer topic:

Anemometer Topic

When the block is at rest with axis aligned with the world frame, the true and apparent wind should be the same. When the block is in motion, for instance by setting the z pose to 100 and letting it fall, the apparent wind will be adjusted for the object's motion.

Anemometer Rest Anemometer Falling

Build Status

Develop Job Status

Melodic
asv_sim Build Status

Release Job Status

Melodic
asv_sim Build Status

License

This is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

asv_sim's People

Contributors

srmainwaring avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.