Ask Your Question
0

Service call from Android to cpp service

asked 2014-02-26 09:28:24 -0500

ruderik gravatar image

updated 2016-10-24 09:01:44 -0500

ngrennan gravatar image

I followed this tutorial /ROS/Tutorials/CreatingMsgAndSrv and want to call the server from Android now, but can't find any hints how to accomplish this step by step.

My main problem is (i think) that i don't have the message structures in java, it's only built for cpp/python.

Can i dynamically create messages in Java without needing the type definitions? Or do i need to tweak something to get the Java definitions from my existing cpp/msg tutorial code?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-02-26 19:34:19 -0500

Daniel Stonier gravatar image

The rosjava message generator is not yet native, so that's why you'll only find cpp/python (and sometimes lisp).

If you just want to use messages from officially released packages, then you can pull them from our rosjava maven repo or if you want to build messages from your own custom message stacks, then check out the instructions in the rosjava wiki. Not being a native generator, it's a bit complicated, but my team does it successfully like this at Yujin for a fairly large set of custom messages. They're neither experts at ros or java, but are quite comfortable with the process now.

edit flag offensive delete link more

Comments

Thanks for your answer and putting me on the right track. I'll try it out following this tutorial /rosjava/Tutorials/hydro/Unofficial Messages (i'm not allowed to post actual links, sorry).

ruderik gravatar image ruderik  ( 2014-02-27 08:04:34 -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

1 follower

Stats

Asked: 2014-02-26 09:28:24 -0500

Seen: 351 times

Last updated: Feb 26 '14