Git Product home page Git Product logo

moos-ros-bridge's Introduction

moos-ros-bridge

A communication bridge between the MOOS and ROS publish-and-subscribe middleware systems.

If you use the moos-ros-bridge in your research, please cite our research paper:

@inproceedings{demarco2011implementation,
    title={An implementation of ROS on the Yellowfin autonomous underwater vehicle (AUV)},
    author={DeMarco, Kevin and West, Michael E and Collins, Thomas R},
    booktitle={OCEANS 2011},
    pages={1--7},
    year={2011},
    organization={IEEE}
}

Build Instructions

Install Dependencies

First, install MOOS as normal. Then, install some extra dependencies from your package manager:

$ sudo apt-get install librapidxml-dev

Build in a catkin workspace

  1. Setup a ROS catkin workspace, if you don't have one already:

     $ source /opt/ros/kinetic/setup.sh
     $ mkdir -p ~/catkin_ws/src && cd ~/catkin_ws/
     $ catkin_make
    
  2. Clone this repo into into ~/catkin_ws/src:

     $ cd ~/catkin_ws/src
     $ git clone https://github.com/SyllogismRXS/moos-ros-bridge.git
    
  3. Build it:

     $ cd ~/catkin_ws
     $ catkin_make
     $ source ./devel/setup.sh
    

Run an Example

Start the MOOS Database

$ MOOSDB

In a different terminal, run a launch file that will start the "Bridge" ROS node as well as a ROS node that increments a counter in the ROS topic, "CounterFromROS," with data type, std_msgs::Int32. Note that the Bridge ROS node requires both a .moos file (bridge.moos), so that it can connect to the appropriate MOOS database, and an XML file (counters.xml), so that the Bridge can translate between ROS and MOOS data types.

$ roslaunch moos-ros-bridge counter.launch

In a new terminal, use uMS to observe the "CounterFromROS" topic being updated in MOOS:

$ uMS

Make sure HostName is LOCALHOST and Port is 9000. Click on "Connect." You should see the CounterFromROS variable incrementing.

At this point, the Bridge is also looking for changes in the "CounterFromMOOS" variable in the MOOS community. Let's monitor the variable in ROS as we change it using uMS. Open a new terminal and run the rostopic echo command:

$ rostopic echo /CounterFromMOOS

In the uMS window, CTRL+RightClick on an empty row. Enter the variable name: CounterFromMOOS. Choose NUMERIC. Enter value: 42. You should see the rostopic echo program print out the following:

data: 42

Run an Example from a Script

Read through the bash script at moos-ros-bridge/scripts/counter.sh for an example of how to start both the Bridge ROS node and MOOS within the same script. Run the script:

$ rosrun moos-ros-bridge counter.sh

# Type CTRL+c to exit

Bridge Configuration

The Bridge is configured using an XML file that specifies the names of ROS and MOOS topics and the associated data types. Look at moos-ros-bridge/config/counters.xml and moos-ros-bridge/config/moosrosconfig.xml for examples. In the XML file, each message consists of the following members:

moosname - the name of the moos variable

rosname - the name of the ros topic

moostype - the type of the moos variable

rostype - the type of the ros topic

direction - the direction of the data over the bridge (either toMOOS or toROS).

moos-ros-bridge's People

Contributors

eric565648 avatar ggbory avatar hchengwang avatar hsuchaochun avatar nichinglin avatar tonycar12002 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.