0
$\begingroup$

Rosanswers logo

Does anyone have a decent tutorial for using rosjava and a PR2? Even a simple tutorial would be greatly beneficial.

Anything with the PR2, actionlib, rosjava groovy would be a great help. I can't find anything.

Thanks, James


Originally posted by jforkey on ROS Answers with karma: 82 on 2013-03-19

Post score: 0

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

As you've covered all the ROSJAVA documentation, you'll find that ROSJava_core development separate from the roscpp development cycles such as Groovy and Fuerte. The integration between a PR2 (or any system) and ROSJAVA is through the message interface. On thing that may restrict you is the lack of a action interface in ROSJAVA. Your solution in that case is to write a node implementing the interface in another language as a proxy.

Other than that it would be a matter of determining the interface you are after and implementing it using the publishers, subscribers,servers and clients in rosjava_core. All the message types are available in rosjava_core.

EDIT

I dont have a tutorial, but I used rosjava to publish GetMotionPlan messages to the ompl_planning node. The key to using these complex message types is creating a variable from the interface using node.getTopicMessageFactory().newFromType(TYPE) as in the example:

trajectory_msgs.JointTrajectoryPoint point1= node.getTopicMessageFactory().newFromType(JointTrajectoryPoint._TYPE);

This allows complex messages, particularly those that contain Java List<> types to be filled and then placed in the message field using one of the message interface's set commands.


Originally posted by PeterMilani with karma: 1493 on 2013-03-21

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by jforkey on 2013-03-21:
Other than that it would be a matter of determining the interface you are after and implementing it using the publishers, subscribers,servers and clients in rosjava_core. All the message types are available in rosjava_core.

Can you point to a tutorial that does this for any single interface?

Comment by PeterMilani on 2013-03-22:
see edit above

$\endgroup$
0
$\begingroup$

Rosanswers logo

There are general support guidelines.

Each important component has its wiki page with everything appertaining:

  • rosjava, docs etc. linked there.

  • PR2, tutorials etc. linked there.

  • actionlib, tutorials linked there.

To get an idea how to glue components read the introduction.

To find code browse the ros.


Originally posted by felix k with karma: 1650 on 2013-03-21

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by jforkey on 2013-03-21:
A) The rosjava link simply references another external link, which I have read entirely multiple times.
B) The PR2 link contains links for other versions of ROS, not groovy, or anything about rosjava. C) The actionlib link is for ROS (C++), not rosjava.

Comment by felix k on 2013-03-21:
So I'm glad your question wasn't as blunt as it seems to me due to those aspects missing. :)

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.