ros_arduino_bridge error help

asked 2016-07-18 05:56:26 -0600

Emilien gravatar image

updated 2016-07-18 09:21:51 -0600

hi, i use ros indigo on my PC and i install with git ros_arduino_bridge. 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/catkin_ws/src/ros_arduino_bridge/ros_arduino_python/nodes/arduino_node.py", line 195, in <module> myArduino = ArduinoROS() File "/home/pi/catkin_ws/src/ros_arduino_bridge/ros_arduino_python/nodes/arduino_node.py", line 87, in __init__ self.controller.connect() File "/home/pi/catkin_ws/src/ros_arduino_bridge/ros_arduino_python/src/ros_arduino_python/arduino_driver.py", line 68, in connect test = self.get_baud() File "/home/pi/catkin_ws/src/ros_arduino_bridge/ros_arduino_python/src/ros_arduino_python/arduino_driver.py", line 261, in get_baud return int(self.execute('b')); File "/home/pi/catkin_ws/src/ros_arduino_bridge/ros_arduino_python/src/ros_arduino_python/arduino_driver.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/catkin_ws/src/ros_arduino_bridge/ros_arduino_python/nodes/arduino_node.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: my_arduino_params.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}
}
edit retag flag offensive close merge delete

Comments

could you please print your launch file

cagatay gravatar imagecagatay ( 2016-07-18 05:58:16 -0600 )edit

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>
Emilien gravatar imageEmilien ( 2016-07-18 06:47:48 -0600 )edit

and the yaml file my_arduino_params.yaml

cagatay gravatar imagecagatay ( 2016-07-18 06:55:27 -0600 )edit

i add it above

Emilien gravatar imageEmilien ( 2016-07-18 07:00:24 -0600 )edit

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

cagatay gravatar imagecagatay ( 2016-07-18 07:34:25 -0600 )edit

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

Emilien gravatar imageEmilien ( 2016-07-18 08:00:09 -0600 )edit

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

cagatay gravatar imagecagatay ( 2016-07-19 01:00:41 -0600 )edit