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

Remote activation of serial ports using ssh

asked 2017-06-02 14:12:44 -0600

StevenCoral gravatar image

updated 2017-06-03 01:21:29 -0600

gvdhoorn gravatar image

Hi all, I could not seem to find the answer (or the right keywords) for this on the internet. I'll try to keep it short otherwise I could go on and on.... I basically have a raspberry pi 2 controlling a Neato-xv-11 Lidar (both closed-loop rotation and data spoofing). The code works quite well actually, but the intention is to have the lidar on a mobile platform and view the outcome using Rviz from a remote computer via WiFi. That actually works as well, but only if I start the spoofing node available here from within the Pi itself.

When I try to start (roslaunch) this node using ssh, I get an error. My guess is that it has something to do with the fact that this node addresses a dev/ttyusb0 that is local on the Pi (cp2102-usb-breakout). Why is this happening? Is there any way around this?

I'm using Kinetic on both machines, with Pi running Jessie 8, and PC running Ubuntu 16.04.

My error message is as follows (ignore the host names, they were arbitrary):

pi@erle-brain-2 ~ $ roslaunch neato_real neato_lidar_drivers.launch
... logging to /home/pi/.ros/log/51d2060c-47c1-11e7-8a35-c417feb194f9/roslaunch-erle-brain-2-6338.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://erle-brain-2:35380/

SUMMARY

PARAMETERS
 * /rosdistro: kinetic
 * /rosversion: 1.12.4

NODES
  /
    lidar_driver (xv_11_laser_driver/neato_laser_publisher)
    lidar_rotator (neato_real/lidar_rotator_raspi.py)

ROS_MASTER_URI=http://movies-PC:11311

core service [/rosout] found
process[lidar_driver-1]: started with pid [6349]
terminate called after throwing an instance of 'std::runtime_error'
  what():  locale::facet::_S_create_c_locale name not valid
process[lidar_rotator-2]: started with pid [6350]
[lidar_driver-1] process has died [pid 6349, exit code -6, cmd /home/pi/catkin_ws/devel/lib/xv_11_laser_driver/neato_laser_publisher _port:=/dev/ttyUSB0 __name:=lidar_driver __log:=/home/pi/.ros/log/51d2060c-47c1-11e7-8a35-c417feb194f9/lidar_driver-1.log].
log file: /home/pi/.ros/log/51d2060c-47c1-11e7-8a35-c417feb194f9/lidar_driver-1*.log
^C[lidar_rotator-2] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done

Thanks is advance, Steve

edit retag flag offensive close merge delete

Comments

only if I start the spoofing node

this may by my unfamiliarity with the neato driver, but what do you mean with 'spoofing' node? There is only a single node in the neato pkg, and that is a regular ROS node publishing the laser scans.

gvdhoorn gravatar image gvdhoorn  ( 2017-06-03 01:15:03 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-06-03 01:17:44 -0600

gvdhoorn gravatar image

updated 2017-06-03 06:13:47 -0600

locale::facet::_S_create_c_locale name not valid

This is the real error. It most likely has nothing to do with serial ports.

Can you please log in using SSH into the machine that is giving you trouble and tell us what the output of the locale command is?

If there is anything strange about the output of locale, see if this fixes it. Be sure to use the correct locale codes of course.

edit flag offensive delete link more

Comments

I will try. as for what I meant by "spoofing node", is that I use a roslaunch with two nodes - one is the ROS node publishing the laser scans, and the other is a node i wrote which controls the motor speed. the first one gives the error, the other one loads smoothely via ssh.

StevenCoral gravatar image StevenCoral  ( 2017-06-03 03:09:18 -0600 )edit

Well, that worked! locale in the host PC was en_US and he_IL, and on the Pi all was en_GB (otherwise keyboard shift+sign becomes weird for some reason. exported LC_ALL to be the same, and problem solved. now I have other troubles, pi-related. cheers!

StevenCoral gravatar image StevenCoral  ( 2017-06-03 03:51:01 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2017-06-02 14:12:44 -0600

Seen: 275 times

Last updated: Jun 03 '17