The current node crushes if given serial_id points out symlink.
For example, if /dev/ttyUSB0 is symlinked to /dev/robotiq_ft_sensor by udev, the error shows up as followings:
$ rosrun robotiqt_sensor rq_sensor _serial_id:=rarm_robotiq_ft_sensor
[ INFO] [1562236271.820355094] [/robotiq_ft_sensor:ros.robotiq_ft_sensor]: Trying to connect to a sensor at /dev/rarm_robotiq_ft_sensor
*** buffer overflow detected ***: ~/catkin_ws/devel/lib/robotiq_ft_sensor/rq_sensor terminated
... a lot of core dumps ...
This PR fixes the error by reading symlinks before passing it to the part of sensor reading.
The current node crushes if given
serial_id
points out symlink. For example, if/dev/ttyUSB0
is symlinked to/dev/robotiq_ft_sensor
byudev
, the error shows up as followings:This PR fixes the error by reading symlinks before passing it to the part of sensor reading.