Coder Social home page Coder Social logo

ambf_load_adf_plugin's Introduction

AMBF Load ADF Plugin

A plugin for the Asynchronous Multibody Framework (AMBF), see https://github.com/WPI-AIM/ambf The plugin allows you to load an ADF file into the AMBF simulator environment at arbitrary times during runtime using a ros service call

Developed by Henry Phalen

This exists as a "drag-and-drop" feature in the simulator already, but it is nice to be able to add things programmatically as well (e.g. you could call this service from e.g. a Python script to load an ADF file at a certain time in a simulation)

Features:

  1. Load an ADF file into the simulator at runtime using a ros service call

rosservice call /ambf/load_adf_plugin/add_adf_file "data: '<filename>'"

untitled.webm

Building

Find most updated instructions for building AMBF on that git repository (https://github.com/WPI-AIM/ambf)

This plugin uses ROS so you build it in a catkin workspace.

Build within a catkin workspace (ROS1)

A simple package.xml has been included in this repository to enable catkin to find and build it <plugin_path> should be located within catkin_ws/src/

cd <catkin_ws>
catkin build ambf_load_adf_plugin

Using plugin

Starting plugin

Find most updated instructions for starting AMBF with plugins on that git repository (https://github.com/WPI-AIM/ambf)

You can test this plugin on the example by:

  • <ambf_exe_dir> ---> e.g. ~/ambf/bin/lin-x86_64
  • <plugin_so_path> ---> e.g. <catkin_ws>/devel/lib/libambf_load_adf_plugin.so
  • <adf_filepath> ---> e.g. <ambf_path>/ambf_models/descriptions/multi-bodies/robots/blender-toy-car.yaml

Start a ROS core. Then start the simulator with the plugin:

cd <ambf_exe_dir>
./ambf_simulator --plugins <plugin_so_path>

Then you can load the ADF file into the simulator using the service call:

rosservice call /ambf/load_adf_plugin/add_adf_file "data: '<adf_filepath>'"

It is best practice to put your plugins into your launch.yaml file e.g.

plugins: [
  {
    name: ROS_ADF_LOADER,
    filename: libambf_load_adf_plugin.so,
    path: <plugin_so_path> .
  }
]

TODOs / Future Work

Something I hope to get to someday (or you could do it too! :) )

  1. Why does the so appear in <catkin_ws>/devel/lib, not <catkin_ws>/build/?
  2. ROS2 version

ambf_load_adf_plugin's People

Contributors

htp2 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.