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

'locale' Error with Hokuyo_node and ARM (BeagleBone)

asked 2013-05-21 12:24:29 -0600

TJump gravatar image

updated 2014-01-28 17:16:35 -0600

ngrennan gravatar image

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 trunk --svn -y
rosws update laser_drivers
source ~/ros_ws/setup.bash


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/


  * /hokuyo/calibrate_time
  * /hokuyo/intensity
  * /hokuyo/port
  * /rosdistro
  * /rosversion

    hokuyo (hokuyo_node/hokuyo_node)


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
Unhandled exception in thread started by 
sys.excepthook is missing
lost sys.stderr
edit retag flag offensive close merge delete



Did you install binary packages or build it from source?

joq gravatar image joq  ( 2013-05-21 17:33:26 -0600 )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.

TJump gravatar image TJump  ( 2013-05-22 02:45:44 -0600 )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?

joq gravatar image joq  ( 2013-05-22 05:48:58 -0600 )edit

Also, please paste in a gdb backtrace from the exception.

joq gravatar image joq  ( 2013-05-22 05:50:28 -0600 )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.

joq gravatar image joq  ( 2013-05-22 08:04:02 -0600 )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.

TJump gravatar image TJump  ( 2013-05-22 10:35:47 -0600 )edit

Go ahead and try it, but locale C should be the default.

joq gravatar image joq  ( 2013-05-22 10:53:59 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2013-05-22 12:15:37 -0600

TJump gravatar image

updated 2013-05-22 13:28:39 -0600

This seems to be an issue on embedded systems with minimal installs. The 'locale' settings on the BeagleBone, when called are:

rkrs@bbone2:~$ locale

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.

edit flag offensive delete link 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 =)

Lure_Angler gravatar image Lure_Angler  ( 2013-09-14 17:12:32 -0600 )edit

Question Tools

1 follower


Asked: 2013-05-21 12:24:29 -0600

Seen: 1,420 times

Last updated: May 22 '13