Fixed bug in arduino_node.py changing aggregate topic name from sensors to sensor_state

This commit is contained in:
Patrick Goebel 2012-12-21 18:07:11 -08:00
parent a1a87116f5
commit ad01b6ad55
3 changed files with 10 additions and 10 deletions

View File

@ -219,9 +219,9 @@ int runCommand() {
#ifdef USE_BASE
case READ_ENCODERS:
Serial.print(readEncoder(0));
Serial.print(readEncoder(LEFT));
Serial.print(" ");
Serial.println(readEncoder(1));
Serial.println(readEncoder(RIGHT));
break;
case RESET_ENCODERS:
resetEncoders();

View File

@ -1,11 +1,11 @@
port: /dev/ttyACM0
port: /dev/ttyUSB0
baud: 57600
timeout: 0.1
rate: 50
sensorstate_rate: 10
use_base_controller: True
use_base_controller: False
base_controller_rate: 10
# === Robot drivetrain parameters
@ -30,9 +30,9 @@ base_controller_rate: 10
# * PololuMotorCurrent
sensors: {
motor_current_left: {pin: 0, type: PololuMotorCurrent, rate: 5},
motor_current_right: {pin: 1, type: PololuMotorCurrent, rate: 5},
ir_front_center: {pin: 2, type: GP2D12, rate: 10},
sonar_front_center: {pin: 5, type: Ping, rate: 10},
arduino_led: {pin: 13, type: Digital, rate: 2, direction: output}
#motor_current_left: {pin: 0, type: PololuMotorCurrent, rate: 5},
#motor_current_right: {pin: 1, type: PololuMotorCurrent, rate: 5},
#ir_front_center: {pin: 2, type: GP2D12, rate: 10},
#sonar_front_center: {pin: 5, type: Ping, rate: 10},
arduino_led: {pin: 13, type: Digital, rate: 5, direction: output}
}

View File

@ -63,7 +63,7 @@ class ArduinoROS():
# The SensorState publisher periodically publishes the values of all sensors on
# a single topic.
self.sensorStatePub = rospy.Publisher('~sensors', SensorState)
self.sensorStatePub = rospy.Publisher('~sensor_state', SensorState)
# A service to position a PWM servo
rospy.Service('~servo_write', ServoWrite, self.ServoWriteHandler)