ros_arduino_brigde no connection after first connect [closed]

asked 2016-10-14 05:21:50 -0500

anonymous user

Anonymous

Hello,

i am using the ros_arduino_bridge on a Arduino UNO with encoders. Also i am using a Dagu Trex (arduino nano) whichs subscribes to the "cmd_vel". After i flashed the sketch to the Arduino, i can connect to the Arduino and use it. Works all perfect.

But when I close the node and want to connect to the Arduino again it is not possible. I checked the port and it is correct.

Once i reflash it works again until i reconnect again.

This is the log when i try to connect again:

 started roslaunch server http://ubuntu:33870/

SUMMARY
========

PARAMETERS
 * /arduino/Kd: 12
 * /arduino/Ki: 0
 * /arduino/Ko: 50
 * /arduino/Kp: 10
 * /arduino/accel_limit: 1.0
 * /arduino/base_controller_rate: 10
 * /arduino/base_frame: base_link
 * /arduino/baud: 57600
 * /arduino/encoder_resolution: 272
 * /arduino/gear_reduction: 1.0
 * /arduino/motors_reversed: False
 * /arduino/port: /dev/ttyUSB1
 * /arduino/rate: 50
 * /arduino/sensorstate_rate: 10
 * /arduino/timeout: 0.1
 * /arduino/use_base_controller: True
 * /arduino/wheel_diameter: 0.12
 * /arduino/wheel_track: 0.25
 * /rosdistro: jade
 * /rosserial_server/port: /dev/ttyUSB0
 * /rosversion: 1.11.20

NODES
  /
    arduino (ros_arduino_python/arduino_node.py)
    rosserial_message_info (rosserial_python/message_info_service.py)
    rosserial_server (rosserial_server/serial_node)
    rviz (rviz/rviz)
    teleop (teleop_twist_keyboard/teleop_twist_keyboard.py)

auto-starting new master
process[master]: started with pid [5307]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 881ad58a-9151-11e6-8bb2-6894237e958b
process[rosout-1]: started with pid [5320]
started core service [/rosout]
process[rosserial_server-2]: started with pid [5337]
process[rosserial_message_info-3]: started with pid [5338]
process[arduino-4]: started with pid [5348]
process[teleop-5]: started with pid [5352]
process[rviz-6]: started with pid [5353]
[ INFO] [1476369005.729067278]: rviz version 1.11.14
[ INFO] [1476369005.729188461]: compiled against Qt version 4.8.6
[ INFO] [1476369005.729241906]: compiled against OGRE version 1.9.0 (Ghadamon)
[ INFO] [1476369006.041779204]: Stereo is NOT SUPPORTED
[ INFO] [1476369006.042130605]: OpenGl version: 3 (GLSL 1.3).
[DEBUG] [WallTime: 1476369006.656749] init_node, name[/arduino], pid[5348]
[DEBUG] [WallTime: 1476369006.657364] binding to 0.0.0.0 0
[DEBUG] [WallTime: 1476369006.657810] bound to 0.0.0.0 60373
[DEBUG] [WallTime: 1476369006.664508] ... service URL is rosrpc://ubuntu:60373
[DEBUG] [WallTime: 1476369006.665048] [/arduino/get_loggers]: new Service instance
[DEBUG] [WallTime: 1476369006.668261] ... service URL is rosrpc://ubuntu:60373
[DEBUG] [WallTime: 1476369006.668744] [/arduino/set_logger_level]: new Service instance
/home/senintel/catkin_ws/src/ros_arduino_bridge/ros_arduino_python/nodes/arduino_node.py:62: SyntaxWarning: The publisher should be created with an explicit keyword argument 'queue_size'. Please see http://wiki.ros.org/rospy/Overview/Publishers%20and%20Subscribers for more information.
  self.cmd_vel_pub = rospy.Publisher('cmd_vel', Twist)
/home/senintel/catkin_ws/src/ros_arduino_bridge/ros_arduino_python/nodes/arduino_node.py:66: SyntaxWarning: The publisher should be created with an explicit keyword argument 'queue_size'. Please see http://wiki.ros.org/rospy/Overview/Publishers%20and%20Subscribers for more information.
  self.sensorStatePub = rospy.Publisher('~sensor_state', SensorState)
[DEBUG] [WallTime: 1476369006.708764] ... service URL is rosrpc://ubuntu:60373
[DEBUG] [WallTime: 1476369006.709069] [/arduino/servo_write]: new Service instance
[DEBUG] [WallTime: 1476369006.711850] ... service URL is rosrpc://ubuntu:60373
[DEBUG] [WallTime: 1476369006.712294] [/arduino/servo_read]: new Service instance
[DEBUG] [WallTime: 1476369006.720304] ... service URL is rosrpc://ubuntu:60373
[DEBUG] [WallTime: 1476369006.721411] [/arduino/digital_set_direction]: new Service ...
(more)
edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2020-11-16 16:41:41.695736

Comments

Can you please let us know what version of ROS you are using (e.g. Hydro, Indigo) and which branch of ros_arduino_bridge you are using (e.g. hydro-devel, indigo-devel).

Pi Robot gravatar image Pi Robot  ( 2016-10-14 07:49:10 -0500 )edit

Hi, sorry i forgot to mention it.

Ros Distro : Jade
Branch : indigo-devel
anonymous userAnonymous ( 2016-10-14 11:34:07 -0500 )edit

I haven't tested the package with Jade, but try doing a "git pull" in your ros_arduino_bridge directory to get the latest indigo-devel updates. I pushed an update a few months ago that puts a try-except block around the get_baud() function.

Pi Robot gravatar image Pi Robot  ( 2016-10-14 12:56:38 -0500 )edit