Hardware Reference
In-Depth Information
$ sudo apt-get install git
$ git clone https://github.com/spotrh/nxt
ROS is very, very picky about where its files live on the filesystem, so you need to move
your nxt checkout to the proper location:
$ sudo mv nxt /opt/ros/groovy/share/
If you do not move the nxt “stack” into that ROS directory, none of the ROS tools will
find it.
You'll need to set up Raspbian to give permission for the pi user to communicate with
the NXT Intelligent Brick as a normal user (rather than using root). To do this, start by
adding the lego group:
$ sudo groupadd lego
Then add yourself to that group:
$ sudo usermod -a -G lego <username>
The value for <username> is either the default pi username in Raspbian or a custom
user, if you have created one.
Next, set up udev rules to allow any users in the lego group to have read/write access
to the NXT Intelligent Brick. The nxt/70-lego.rules file contains prewritten rules, so
you just need to copy it into the udev rules directory:
$ sudo cp -a nxt/70-lego.rules /etc/udev/rules.d/70-lego.rules
Then restart udev to make the new rules take effect:
$ sudo service udev restart
Locale Handling in Raspbian
Raspbian defaults to a locale setting of en_GB.UTF-8. You might encounter
weird errors if you're actually trying to communicate from en_US.UTF-8 (or
any other UTF-8 locale that isn't en_GB). ROS does this sometimes. Specif-
ically, this sort of thing:
terminate called after throwing an instance of 'std::runtime_error'
what(): locale::facet::_S_create_c_locale name not valid
Aborted
This error is caused because the en_US.UTF-8 (or other requested) locale
does not exist. The easiest way to fix this is by running dpkg-reconfigure :
$ sudo dpkg-reconfigure locales
 
Search WWH ::




Custom Search