Ask Your Question
0

rosjava and pr2 tutorial

asked 2013-03-19 14:35:01 -0500

jforkey gravatar image

updated 2014-11-22 17:05:34 -0500

ngrennan gravatar image

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

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2013-03-21 12:14:28 -0500

updated 2013-03-22 00:22:08 -0500

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.

edit flag offensive delete link more

Comments

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?

jforkey gravatar image jforkey  ( 2013-03-21 23:45:28 -0500 )edit

see edit above

PeterMilani gravatar image PeterMilani  ( 2013-03-22 00:13:19 -0500 )edit
1

answered 2013-03-21 07:59:12 -0500

felix k gravatar image

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.

edit flag offensive delete link more

Comments

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.

jforkey gravatar image jforkey  ( 2013-03-21 09:42:52 -0500 )edit

So I'm glad your question wasn't as blunt as it seems to me due to those aspects missing. :)

felix k gravatar image felix k  ( 2013-03-21 23:36:10 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-03-19 14:35:01 -0500

Seen: 156 times

Last updated: Mar 22 '13