-
Notifications
You must be signed in to change notification settings - Fork 6
Sonar Control
Around the head is a ring of 12 sonar sensors for detecting movements within Baxter's proximity. Next to each sonar sensor are yellow LEDs, which by default indicate when the corresponding sensors detect an object within a certain threshold. You can control the sonar sensors and lights to override the default behavior and either disable or enable each of the 12 channels.
To Turn Off the sonar sensors:
bash $ rostopic pub /robot/sonar/set_sonars_enabled std_msgs/UInt16 0
The sonars and the sonar lights display a few different behaviors.
- During Boot-up Behvaior: The yellow lights will 'spin' in a ring around the head.
- Default Run Behavior: The lights near each sensor will respond to objects detected by the sensor.
- Disabled Sonars Behavior: The lights will not respond to motion, and will remain off.
# Check state of enable flags, listen to confirm annoying clicking sound
$ rostopic echo -n1 /robot/sonar/head_sonar/sonars_enabled
data: 4095
---
# Turn off enable flags for all sonar channels
$ rostopic pub /robot/sonar/set_sonars_enabled std_msgs/UInt16 0
# Listen for peaceful silence; confirm enable flags state is 0
$ rostopic echo -n1 /robot/sonar/head_sonar/sonars_enabled
data: 0
---
# Turn back on enable flags for all sonar channels
$ rostopic pub /robot/sonar/set_sonars_enabled std_msgs/UInt16 4095
# Listen, wave hand to activate sonar, confirm enable state
$ rostopic echo -n1 /robot/sonar/head_sonar/sonars_enabled
data: 4095
---
Make sure your ROS_IP or ROS_HOSTNAME is exported and resolvable to the robot.
Make sure that your network connection is configured allowing you to make commands to the robot: https://github.com/RethinkRobotics/sdk-docs/wiki/Connecting-and-Testing-the-Development-Workstation
In particular that your ROS_HOSTNAME is resolvable to the robot, or alternatively setting your ROS_IP to your current ip address (make sure that your ROS_HOSTNAME is not set when using this approach):
http://www.ros.org/wiki/ROS/NetworkSetup#Name_resolution
[baxter_msgs-AssemblyState]: http://github.com/RethinkRobotics/sdk-examples/blob/master/baxter/baxter_msgs/msg/AssemblyState.msg