ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Robot upstart with serial library

asked 2016-05-14 08:28:14 -0600

Andre_Preller_3000 gravatar image

updated 2016-05-14 10:38:42 -0600

gvdhoorn gravatar image

Hi,

I'm using robot_upstart and the 'serial' package ( http://wjwwood.io/serial/ ) on a Fitlet mini ubuntu PC. I've set permissions for serial ports using custom udev rules by navigating to /etc/udev/rules.d and (sudo) creating a new file called 40-permissions.rules with contents as follows

KERNEL=="ttyUSB0", MODE="0666"

... repeat for each serial port used

When I try to run the upstart service in the foreground with:

sudo runslam-start

everything works fine. I had a look at the log file on startup and the only piece of information I could find was:

terminate called after throwing an instance of 'serial::IOException' 
what(): IO Exception (16): Device or resource busy, for ..../src/serial/src/impl/unix.cc, line 151.

Why would the port be busy on startup? And how would I go about fixing this?

Full Error:

process[hector_mapping-4]: started with pid [1473]
process[odom_2_base_footprint-5]: started with pid [1491]
terminate called after throwing an instance of 'serial::IOException'
  what():  IO Exception (16): Device or resource busy, file /home/andre/adr_slam/src/serial/src/impl/unix.cc, line 151.
process[base_link_2_laser-6]: started with pid [1500]
process[hector_trajectory_server-7]: started with pid [1510]
process[hector_geotiff_node-8]: started with pid [1543]
[ INFO] [1463215260.338325073]: Waiting for tf transform data between frames /map and base_stabilized to become available
HectorSM map lvl 0: cellLength: 0.1 res x:1024 res y: 1024
HectorSM map lvl 1: cellLength: 0.2 res x:512 res y: 512
[ INFO] [1463215260.934681633]: HectorSM p_base_frame_: base_footprint
[ INFO] [1463215260.937439552]: HectorSM p_map_frame_: map
[ INFO] [1463215260.938086638]: HectorSM p_odom_frame_: base_footprint
[ INFO] [1463215260.938558139]: HectorSM p_scan_topic_: scan
[ INFO] [1463215260.939030365]: HectorSM p_use_tf_scan_transformation_: true
[ INFO] [1463215260.939420596]: HectorSM p_pub_map_odom_transform_: true
[ INFO] [1463215260.939794708]: HectorSM p_scan_subscriber_queue_size_: 10
[ INFO] [1463215260.940222312]: HectorSM p_map_pub_period_: 0.500000
[ INFO] [1463215260.940644045]: HectorSM p_update_factor_free_: 0.400000
[ INFO] [1463215260.941224273]: HectorSM p_update_factor_occupied_: 0.800000
[ INFO] [1463215260.942148507]: HectorSM p_map_update_distance_threshold_: 0.300000 
[ INFO] [1463215260.942606739]: HectorSM p_map_update_angle_threshold_: 0.040000
[ INFO] [1463215260.943586806]: HectorSM p_laser_z_min_value_: -1.000000
[ INFO] [1463215260.944245548]: HectorSM p_laser_z_max_value_: 1.000000
[ INFO] [1463215261.118777754]: Successfully initialized hector_geotiff MapWriter plugin TrajectoryMapWriter.
[ INFO] [1463215261.119103784]: Geotiff node started
No handlers could be found for logger "roslaunch"
[fake_gps-3] process has died [pid 1467, exit code -6, cmd /home/andre/adr_slam/devel/lib/tf_to_serial_gps/tf_to_serial_gps_node __name:=fake_gps __log:=/tmp/944452a6-19af-11e6-9294-db3f83b218bf/fake_gps-3.log].
log file: /tmp/944452a6-19af-11e6-9294-db3f83b218bf/fake_gps-3*.log
[ INFO] [1463215262.338960828]: Finished waiting for tf, waited 2.000792 seconds
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2016-05-17 22:32:22 -0600

Andre_Preller_3000 gravatar image

updated 2016-05-17 22:32:43 -0600

I ended up fixing this problem by creating a script that delays and then launches my serial node according to this answer

edit flag offensive delete link more
1

answered 2016-08-17 12:15:17 -0600

I am using the rosserial package so that I can communicate with a node running on an arduino. I was getting a permission denied error using robot_upstart. Creating a 40-permissions.rules file with KERNEL=="ttyACM0", MODE="0666" fixed the error for me.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-05-14 08:28:14 -0600

Seen: 1,409 times

Last updated: Aug 17 '16