Robotics StackExchange | Archived questions

ros_arduino_bridge error help

hi, i use ros indigo on my PC and i install with git rosarduinobridge. i configure port and baud with 57600. when i run roslaunch ros_arduino_python arduino.launch i receive this:

Connecting to Arduino on port /dev/ttyACM0 ... Traceback (most recent call last): File "/home/pi/catkinws/src/rosarduinobridge/rosarduinopython/nodes/arduinonode.py", line 195, in myArduino = ArduinoROS() File "/home/pi/catkinws/src/rosarduinobridge/rosarduinopython/nodes/arduinonode.py", line 87, in init self.controller.connect() File "/home/pi/catkinws/src/rosarduinobridge/rosarduinopython/src/rosarduinopython/arduinodriver.py", line 68, in connect test = self.getbaud() File "/home/pi/catkinws/src/rosarduinobridge/rosarduinopython/src/rosarduinopython/arduinodriver.py", line 261, in getbaud return int(self.execute('b')); File "/home/pi/catkinws/src/rosarduinobridge/rosarduinopython/src/rosarduinopython/arduinodriver.py", line 178, in execute return int(value) TypeError: int() argument must be a string or a number, not 'NoneType' [INFO] [WallTime: 1468839317.723302] Stopping the robot... [INFO] [WallTime: 1468839317.724447] Shutting down Arduino Node... [arduino-2] process has died [pid 3268, exit code 1, cmd /home/pi/catkinws/src/rosarduinobridge/rosarduinopython/nodes/arduinonode.py _name:=arduino _log:=/home/pi/.ros/log/17f4efd0-4cd6-11e6-bdc9-b4b676bf3056/arduino-2.log]. log file: /home/pi/.ros/log/17f4efd0-4cd6-11e6-bdc9-b4b676bf3056/arduino-2*.log

Edit: myarduinoparams.yaml

port: /dev/ttyACM0
baud: 57600
timeout: 0.1

rate: 50
sensorstate_rate: 10

use_base_controller: False
base_controller_rate: 10

# For a robot that uses base_footprint, change base_frame to base_footprint
base_frame: base_link

# === Robot drivetrain parameters
#wheel_diameter: 0.146
#wheel_track: 0.2969
#encoder_resolution: 8384 # from Pololu for 131:1 motors
#gear_reduction: 1.0
#motors_reversed: True

# === PID parameters
#Kp: 10
#Kd: 12
#Ki: 0
#Ko: 50
#accel_limit: 1.0

# === Sensor definitions.  Examples only - edit for your robot.
#     Sensor type can be one of the follow (case sensitive!):
#     * Ping
#     * GP2D12
#     * Analog
#     * Digital
#     * PololuMotorCurrent
#     * PhidgetsVoltage
#     * PhidgetsCurrent (20 Amp, DC)
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: 5, direction: output}
}

Asked by Emilien on 2016-07-18 05:56:26 UTC

Comments

could you please print your launch file

Asked by cagatay on 2016-07-18 05:58:16 UTC

yes

<launch>
   <node name="arduino" pkg="ros_arduino_python" type="arduino_node.py" output="screen">
      <rosparam file="$(find ros_arduino_python)/config/my_arduino_params.yaml" command="load" />
   </node>
</launch>

Asked by Emilien on 2016-07-18 06:47:48 UTC

and the yaml file my_arduino_params.yaml

Asked by cagatay on 2016-07-18 06:55:27 UTC

i add it above

Asked by Emilien on 2016-07-18 07:00:24 UTC

Are you sure that you have the latest version of the bridge ? Could you follow the install instructions again

Asked by cagatay on 2016-07-18 07:34:25 UTC

yes i install it with git clone so, have you some idea?

Asked by Emilien on 2016-07-18 08:00:09 UTC

I installed it and launched it but i did not get the same error :(

Asked by cagatay on 2016-07-19 01:00:41 UTC

Answers