GithubHelp home page GithubHelp logo

rosjava_actionlib's Introduction

Actionlib for Rosjava

A pure java implementation of actionlib for rosjava. Features implemented:

Latest release: v0.2.0

New in this release:

  • Added goal state tracking to the client.
  • Added a waitForActionServerToStart method to the client.

Requirements:

You can find a video tutorial showing how to install and test the library following the instructions below: https://youtu.be/FmmsMdEbYFs

Downloading:

  1. Download the latest release of the project: https://github.com/ernestmc/rosjava_actionlib/archive/v0.2.0.zip
  2. Unzip it somewhere.

Compiling:

  1. Open a terminal inside the folder where you unzipped the package.
  2. Compile the code using the following command: $ catkin_make

Running a test client:

  1. Open a new terminal and get a ros master running: $ roscore
  2. In another terminal run the actionlib sample server: $ rosrun actionlib_tutorials fibonacci_server
  3. Run our client:
  • Source the project environment: $ source devel/setup.bash
  • Run the client: $ rosrun rosjava_actionlib execute com.github.ekumen.rosjava_actionlib.TestClient

Output from the test client

The test client will connect to the fibonacci server and send it a goal. It should then receive feedback from the server and a final response. The output should look something like this:

Loading node class: com.github.ekumen.rosjava_actionlib.TestClient

Waiting for action server to start...
Action server started.

Sending goal...
Sent goal with ID: /fibonacci_test_client-1-1453494018.17000000
Waiting for goal to complete...
Feedback from Fibonacci server: 0 1 1
Feedback from Fibonacci server: 0 1 1 2
Feedback from Fibonacci server: 0 1 1 2 3
Got Fibonacci result sequence: 0 1 1 2 3
Goal completed!

Sending a new goal...
Sent goal with ID: /fibonacci_test_client-2-1453494021.25000000
Cancelling this goal...
Feedback from Fibonacci server: 0 1 1
Got Fibonacci result sequence:
Goal cancelled succesfully.

Bye!

Running a test server:

  1. Run our server:
  • Source the project environment: $ source devel/setup.bash
  • Run the server: $ rosrun rosjava_actionlib execute com.github.ekumen.rosjava_actionlib.TestServer
  1. If its not already running, open a new terminal and get a ros master running: $ roscore
  2. In another terminal run the actionlib sample client: $ rosrun actionlib_tutorials fibonacci_client
  3. Once finished, use Ctrl+C to close the server.

Output from the test server

The test server will start running and wait for clients to connect and send goal messages. Once the fibonacci client sends a goal, the server accepts it and sends a result. The output should look something like this:

Goal received.
Goal accepted.
Sending result...

Running demos for the server and the client

You can launch a demo client and a fibonacci action server all at once using:

roslaunch rosjava_actionlib client_demo.launch --screen

You can also launch a demo server and a fibonacci action client all at once using:

roslaunch rosjava_actionlib server_demo.launch --screen

Use Ctrl+C to stop the execution once it's finished.

Running unit tests

$ cd src/rosjava_actionlib/
$ ./gradlew test

rosjava_actionlib's People

Contributors

ernestmc avatar

Watchers

James Cloos avatar JP 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.