[Documentation] [TitleIndex] [WordIndex

Installation of nxt_lejos

WARNING: This documentation refers to an outdated version of rosjava and is probably incorrect. Use at your own risk.

Prerequisites

nxt_lejos required ROS electric or later.

It requires rosjava.

It requires a lejos installation. Version 0.9.1 or later is required.

Check out and build

nxt_lejos is under active development, and so it needs to be installed from source.

Change directory to your ROS workspace and type:

svn co https://lejos.svn.sourceforge.net/svnroot/lejos/trunk/ros/nxt_lejos nxt_lejos
cd nxt_lejos
cd nxt_lejos_msgs
rosmake
cd ..
gradle installApp

This will check out a copy of nxt_lejos and build it.

Change reference to leJOS installation

Currently, you will have to change references to your leJOS installation in the build.xml and manifest.xml files in each package that you use. There are references to pccomm.jar and two bluecove jar files. These are in the lib/pc and lib/pc/3rdparty directories in your leJOS installation.

To change these, change directory to the package you wish to use, e.g. nxt_lejos_proxy, edit the two files, changing the absolute paths to the correct ones for your system, remove the .classpath file and run rosmake. This will rebuild the package using your leJOS installation. The purpose of removing the .classpath file, is to regenerate it correctly for your system. It is only used if you import the package into Eclipse.

The ROS Responder

To run the leJOS API you need to run either nxt_lejos_proxy or nxt_lejos_lcp_proxy.

The preferred node to use is nxt_lejos_proxy as it is much faster and more up to date. This node requires that you run a ROS responder program on the NXT. The simplest way to run the ROS Responder is from Eclipse using the leJOS Eclipse plugin. The source of the responder is available at https://lejos.svn.sourceforge.net/svnroot/lejos/trunk/samples/src/org/lejos/sample/rosresponder/.

Connection to the NXT brick

If you want to use a Bluetooth connection to the NXT you will need a Bluetooth dongle, or Bluetooth hardware support in your PC. You will need to pair the NXT brick. This can be done using hcitool.

If you want to use connect to the brick using USB, you should follow the Linux installation instructions for leJOS. In particular you need to ensure you have built libjlibnxt.so and set up the udev rules so that you can access the USB device.

Building leJOS from source

If you wish, you can check out the whole of lejos from sourceforge and build leJOS from source. To rebuild leJOS and use a snapshot version of it, run the ant build file in the snapshot directory. This will create a new version of pccomm.jar, which is used by the proxy packages (in manifest.xml and build.xml). If you are using USB you will need to copy the lib/pc/native/linux directory from an 0.9.1 leJOS installation to snapshot/lib/pc/native, so that libjlibnxt.so can be found.


2024-11-23 14:49