Rosanswers logo

Hi, My microphone is working perfectly. But, when I try to run the ROAR trainer program(Tutorial),Could not able to run no 7 option. Could you please help me to configure this? Errors as follows :

-------------------------My console Error---------------------------

===== Audio Learner =====
  1. Estimate background subtraction
  2. Create a new model or open an existing model
  3. Inspect size of currently open model
  4. Learn new model entries
  5. Learn new model entries (continuous mode)
  6. Save current model to file
  7. Test microphone (1.5s)
  8. Quit Select a menu option: 7

Traceback (most recent call last): File "/home/hiranya/ros_workspace/roar_stack/roar/scripts/audio_trainer.py", line 211, in mono = aa.get_audio_chunk(1.5,True); File "/home/hiranya/ros_workspace/roar_stack/roar/scripts/alsa_subscriber.py", line 168, in get_audio_chunk audat = self.get_windowed_audio(); File "/home/hiranya/ros_workspace/roar_stack/roar/scripts/alsa_subscriber.py", line 151, in get_windowed_audio self.audioBuffer = self.audioBuffer[self.nremove:]; TypeError: only integer arrays with one element can be converted to an index [roar/roar_trainer_server-2] process has died [pid 2830, exit code 1]. log files: /home/hiranya/.ros/log/86a1e7e0-1d09-11e2-a989-20cf30f31663/roar-roar_trainer_server-2*.log

---------------log file----------------------------

[rospy.client][INFO] 2012-10-23 19:02:33,212: init_node, name[/roar/roar_trainer_server], pid[2830] [xmlrpc][INFO] 2012-10-23 19:02:33,212: XML-RPC server binding to [xmlrpc][INFO] 2012-10-23 19:02:33,213: Started XML-RPC server [http://hiranya-AIT:37890/] [rospy.init][INFO] 2012-10-23 19:02:33,213: ROS Slave URI: [http://hiranya-AIT:37890/] [rospy.impl.masterslave][INFO] 2012-10-23 19:02:33,213: _ready: http://hiranya-AIT:37890/ [xmlrpc][INFO] 2012-10-23 19:02:33,214: xml rpc node: starting XML-RPC server [rospy.registration][INFO] 2012-10-23 19:02:33,215: Registering with master node http://localhost:11311 [rospy.init][INFO] 2012-10-23 19:02:33,314: registered with master [rospy.rosout][INFO] 2012-10-23 19:02:33,349: initializing /rosout core topic [rospy.rosout][INFO] 2012-10-23 19:02:33,351: connected to core topic /rosout [rospy.simtime][INFO] 2012-10-23 19:02:33,353: /use_sim_time is not set, will not subscribe to simulated time [/clock] topic [rospy.core][INFO] 2012-10-23 19:02:38,747: signal_shutdown [atexit] [rospy.impl.masterslave][INFO] 2012-10-23 19:02:38,753: atexit

Thank you very much.

Best Regards, Hiranya

Originally posted by hiranya on ROS Answers with karma: 104 on 2012-10-23

Post score: 0


1 Answer 1


Rosanswers logo

I change the lines in get_windowed_audio(self) method in alsa_subscriber.py as follows self.audioBuffer = self.audioBuffer[int(self.nremove):]; self.stampBuffer = self.stampBuffer[int(self.nremove):];

it works, Thank you very much ROAR authors.

Originally posted by hiranya with karma: 104 on 2012-10-24

This answer was ACCEPTED on the original site

Post score: 1


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.