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

steinaak's profile - activity

2021-02-01 06:57:50 -0500 received badge  Favorite Question (source)
2020-11-14 17:13:08 -0500 received badge  Great Question (source)
2019-03-11 09:55:12 -0500 received badge  Good Question (source)
2019-02-11 10:48:03 -0500 received badge  Nice Question (source)
2017-03-27 12:51:58 -0500 marked best answer Send .wav files to other ROS module

Hi!

I am TOTALLY new in ROS. I have a package consisting of two ROS modules where the first module takes input from a microphone and saves it as a ".wav" file. I want this module to publish this ".wav"-file to a topic so that the other ROS module is able to receive it(subscribe the topic). How do I do this? I have been looking at the ROS package called audio_common, but I cant figure out how to do it. Do I need to convert the ".wav"-file into bytes and stuff before sending? I have no idea!

Any advices would help here!

2016-08-13 11:47:37 -0500 marked best answer Passing arguments to callback in Python

Hi!

I have a problem passing arguments to a callback function when Subscribing a ROStopic. The code below is what I do have now. But I only received error messages when I tried to pass arguments to the callback function. I want to send two dictionaries to the callback function together with the text received on the topic called "text" in the subscriber function below. How to pass these arguments? So far I have only been receiving thousands of error messages.

def callback(data):
    rospy.loginfo(data)

def subscriber():
    rospy.init_node("listen_for_conversation",anonymous=True)
    dict_1 = {.....}
    dict_2={......}
    content = rospy.Subscriber("text",String,callback)
    rospy.spin()

Hoping for good answers!

Thanks

2016-07-29 11:25:38 -0500 received badge  Student (source)
2016-07-15 09:50:06 -0500 received badge  Famous Question (source)
2016-06-09 10:00:01 -0500 received badge  Famous Question (source)