Code Monkey home page Code Monkey logo

float_simulation's Introduction

Float Simulation

This repo contains the files necessary for simulating the bottom following floats in the UUV Simulator.

Requirements

  • ROS (tested on Melodic)
  • Gazebo (tested on Gazebo 9)
  • UUV Simulator

Building

Move to the source directory of your catkin workspace:

cd ~/WORKSPACE/src

Clone this repo:

git clone https://github.com/jacksonhshields/float_simulation.git

Also clone the float repos:

git clone https://github.com/acfrmarine/float_ros.git
git clone https://github.com/acfrmarine/float_ros_msgs.git
git clone https://github.com/acfrmarine/bff_ros.git  # Add CATKIN_IGNORE TO ALL PACKAGES EXCEPT MSG PACKAGES 

Build the catkin workspace:

cd ~/WORKSPACE
catkin_make

Usage

Basic Demonstration

First, launch an instance of the 'ocean waves' world in uuv simulator:

roslaunch uuv_gazebo_worlds ocean_waves.launch

Next, spawn the float into this world (remember to source the workspace), this also launches controllers. All topics are mapped to be the same as in the float.

roslaunch bffv2_description bffv2_description.launch

Basic Control Calls

Similar to the real float, run a depth controller by calling the following service:

rosservice call /set_depth_target "depth_target: 10.0
timeout: 30.0"

To run the altitude controller:

rosservice call /set_altitude_target "altitude_target: 2.0
timeout: 60.0"

Float Missions

Adding A Mission

Adding the mission is done through a service call to /float2/add_mission, with the type bff_ros_msgs/add_float_mission.msg.

rosservice call /float2/add_mission "mission_stamped:
  header:
    seq: 0
    stamp:
      secs: 0
      nsecs: 0
    frame_id: ''
  mission:
    mission_id: {uuid: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}
    float_name: 'float2'
    altitude: 10.0
    bottom_duration: 0.0
    mission_duration: 5.0
    dive_abort_duration: 0.0
    abort_depth: 10.0
    abort_time: {secs: 0, nsecs: 0}"
Notify Float Deploying

This service is called immediately before the float is to be deployed. The cameras and localisation will start immediately. The thrusters will start once the wait time is elapsed.

rosservice call /float2/notify_deploying "wait: 30.0"
Notify Float Recovered

When the float is recovered, call the notify float recovered service. The float will respond with data from its mission.

rosservice call /float2/notify_recovered "surface_vessel_name: 'workboat1'"

Currents

UUV simulator has various ways of adding currents to the simulator (link). Here is one way:

roslaunch uuv_control_utils set_timed_current_perturbation.launch starting_time:=0.0 end_time:=1000.0 current_vel:=0.1 horizontal_angle:=150.0

float_simulation's People

Contributors

jacksonhshields avatar

Stargazers

 avatar

Watchers

 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.