Ask Your Question
0

rosjava node pub and sub with roscpp/rospy

asked 2011-09-11 19:22:46 -0500

sskk89 gravatar image

updated 2011-09-11 19:23:37 -0500

Hi, I'm new to both ROS and android. Just one question, can a robot running on roscpp or rospy subscribe to a topic published by an Android rosjava?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2011-09-11 20:12:16 -0500

Lorenz gravatar image

updated 2011-09-11 20:13:11 -0500

Yes, it will work. The client libraries just implement the ROS communication protocol which is the same for java, c++, python and lisp.

edit flag offensive delete link more

Comments

Can my publisher in rospy and subscriber in rosjava be in two separate packages in the same workspace?I am new to ROS and there are different build commands for rospy like catkin_make and gradlew for rosjava. Can i use the same workspace for building both the scripts by putting them in two seperate packages or should i put them in the same package?

uzair gravatar imageuzair ( 2013-11-12 13:41:31 -0500 )edit

It doesn't matter where they are. You could have a source workspace for buliding your desktop (python) packages. And a completely separate source workspace where you build your android packages. The only thing in common they need is the message package.

Daniel Stonier gravatar imageDaniel Stonier ( 2013-11-13 12:45:39 -0500 )edit

but the message packages are different for rospy and rosjava right? we use std_msgs for python and rosjava_messages for rosjava..do i add both of these package dependencies to both the packages between whom i am publishing and subscribing? cant i just use the same topic and message type for the publisher and subscriber?

uzair gravatar imageuzair ( 2013-11-13 23:10:15 -0500 )edit

Its actually std_msgs + genpy for python and std_msgs + rosjava_bootstrap + java_messages for rosjava. genpy generates the python modules for std_msgs and puts them inside std_msgs. rosjava_bootstrap generates the java artifacts for std_msgs and puts them inside rosjava_messages.

Daniel Stonier gravatar imageDaniel Stonier ( 2013-11-14 01:36:38 -0500 )edit

We'd like a genjava eventually, not too far off that target now.

Daniel Stonier gravatar imageDaniel Stonier ( 2013-11-14 01:37:02 -0500 )edit

So if i put my publisher(rospy) in catkin_ws/src1 and my subscriber(rosjava) in catkin_ws/src2, how do i build them separately then? catkin_ws/src1 needs catkin_make whereas catkin_ws/src2 needs gradle. I really appreciate all the help.

uzair gravatar imageuzair ( 2013-11-14 08:08:06 -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: 2011-09-11 19:22:46 -0500

Seen: 884 times

Last updated: Sep 11 '11