ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

wenjia's profile - activity

2015-07-01 02:22:54 -0500 received badge  Famous Question (source)
2015-07-01 02:22:54 -0500 received badge  Notable Question (source)
2014-08-30 07:20:14 -0500 received badge  Popular Question (source)
2014-08-11 17:50:34 -0500 asked a question Cannot import custom message hydro

I want to send my custom message "audio_common_msgs" in my ros Android project. What I have done: I successfully built the custom msg following tutorial: and tutorial:

Then I add the dependency to my dude project build.gradle:

dependencies { compile 'org.ros.android_core:android_gingerbread_mr1:0.1.+' compile 'org.ros.rosjava_core:rosjava:[0.1,)' compile project(':audio_common_msgs') //compile 'org.ros.rosjava_core:rosjava_tutorial_pubsub:[0.1,0.2)' //compile project(':android_gingerbread_mr1') }

Then I can see the dude project have dependency "audio_common_msgs" both on terminal and in the module setting dependency.

:audio_common_msgs:generateSources UP-TO-DATE
:audio_common_msgs:compileJava UP-TO-DATE
:audio_common_msgs:processResources UP-TO-DATE
:audio_common_msgs:classes UP-TO-DATE
:audio_common_msgs:jar UP-TO-DATE

However, I can not "import audio_common_msgs" in my application. Android Studio said it cannot resolve symble "audio_common_msgs". Why?

2014-08-07 01:50:53 -0500 received badge  Popular Question (source)
2014-04-28 10:53:45 -0500 asked a question org.ros.internal.message.$Proxy2 cannot be cast to std_msgs.Int16MultiArray

When sending audio message from my android device to the ros in pc, I got this error. My code is like:

final Publisher<int16multiarray> publisher_audio = connectedNode.newPublisher("chatter", Int16MultiArray._TYPE); Int16MultiArray audio_str = publisher_audio.newMessage(); audio_str.setData(audioData); publisher_audio.publish(audio_str);

And the audioData is "short[]", which I captured by AudioRecord.

So what is the problem? How can I send the audio message to the ros?