# 'locale' Error with Hokuyo_node and ARM (BeagleBone)

When trying to run the Hokuyo_node ($rosrun hokuyo_node hokuyo_node) I get the following: terminate called after throwing an instance of 'std::runtime_error' what(): locale::facet::_S_create_c_locale name not valid  Please advise what this is and how to repair. ROS Groovy on arm device (BeagleBone witi Ubuntu Quantal) Build Process: cd ~/ros_ws wstool set laser_drivers https://code.ros.org/svn/ros-pkg/stacks/laser_drivers trunk --svn -y rosws update laser_drivers source ~/ros_ws/setup.bash echo$ROS_PACKAGE_PATH
<returned>:
/home/rkrs/ros_ws/laser_drivers:/home/rkrs/ros_ws/imu_um6:/home/rkrs/ros_ws/executive_smach:/home/rkrs/ros_ws/filters:/home/rkrs/ros_ws/xacro:/home/rkrs/ros_catkin_ws/install_isolated/share:/home/rkrs/ros_catkin_ws/install_isolated/stacks

rosmake laser_drivers


I've never done a gdb backtrace so I need to look up how to do this. Here is the full display from the terminal printout from the time in initiate roslaunch:

rkrs@bbone2:~$roslaunch hokuyo_node hokuyo_test.launch ... logging to /home/rkrs/.ros/log/aa4e49d8-c248-11e2-bdff-bc6a299c667c/roslaunch-bbone2-1184.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://bbone2:56486/ SUMMARY --------- PARAMETERS * /hokuyo/calibrate_time * /hokuyo/intensity * /hokuyo/port * /rosdistro * /rosversion NODES / hokuyo (hokuyo_node/hokuyo_node) ROS_MASTER_URI=http://localhost:11311 core service [/rosout] found process[hokuyo-1]: started with pid [1139] terminate called after throwing an instance of 'std::runtime_error' what(): locale::facet::_S_create_c_locale name not valid [hokuyo-1] process has died [pid 1139, exit code -6, cmd /home/rkrs/ros_ws/laser_drivers/hokuyo_node/bin/hokuyo_node __name:=hokuyo __log:=/home/rkrs/.ros/log/aa4e49d8-c248-11e2-bdff-bc6a299c667c/hokuyo-1.log]. log file: /home/rkrs/.ros/log/aa4e49d8-c248-11e2-bdff-bc6a299c667c/hokuyo-1*.log all processes on machine have died, roslaunch will exit shutting down processing monitor... ... shutting down processing monitor complete done Unhandled exception in thread started by sys.excepthook is missing lost sys.stderr  edit retag close merge delete ## Comments 1 Did you install binary packages or build it from source? ( 2013-05-21 17:33:26 -0500 )edit I tried to install from the binary packages using sudo apt-get install ros-groovy-laser-drivers but the package could not be found. ( 2013-05-22 02:45:44 -0500 )edit Most likely a low-level build problem, but possibly ARM-related. Would you update your question to show the steps you used to build the ROS core? ( 2013-05-22 05:48:58 -0500 )edit Also, please paste in a gdb backtrace from the exception. ( 2013-05-22 05:50:28 -0500 )edit Comments do not work well for detailed information, please edit your original question with verbatim data indented four spaces, so we can read it. ( 2013-05-22 08:04:02 -0500 )edit Next clue: I found where$ LC_ALL should =C. When I call $locale at the home directory the last line is$ LC_ALL= with no value. Maybe the locale should be edited to read $LC_ALL=C but I have not yet found how to edit this. ( 2013-05-22 10:35:47 -0500 )edit Go ahead and try it, but locale C should be the default. ( 2013-05-22 10:53:59 -0500 )edit ## 1 Answer Sort by » oldest newest most voted This seems to be an issue on embedded systems with minimal installs. The 'locale' settings on the BeagleBone, when called are: rkrs@bbone2:~$ locale
LANG=
LANGUAGE=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=
rkrs@bbone2:~$ Testing with: rkrs@bbone2:~$ export LC_ALL=C


and I no longer get the error above.

When I went to test the Hokuyo following the tutorial (roscore in one terminal; roslaunch hokuyo_node Hokuyo_test.launch in a separate terminal) I had to run 'export LC_ALL=C' in the new terminal (even though I ran it in the first terminal) to avoid the error.

'export LC_ALL=C' is only active during the session and reverts back to the system settings on logoff/reboot/etc. It looks like the best solution to have this set by default is to add 'export LC_ALL=C' in the local user's .bashrc.

more

Hi there, I downloaded Hydro's source for my Raspbery Pi and built from there. When I ran roscore I encountered the same error message mentioned above; I did the " export LC_ALL=C " and roscore ran without a hitch. Thanks. Will be putting this command in my .bashrc =)

( 2013-09-14 17:12:32 -0500 )edit