Ask Your Question
0

Building nxt_lejos fails finding rosjava.mk

asked 2012-04-25 02:30:16 -0500

andreasw gravatar image

updated 2014-01-28 17:12:06 -0500

ngrennan gravatar image

Hi everybody,

I'm currently trying to connect Lego Mindstorms NXT to ROS via rosjava as described here, but the installation fails at nxt_lejos_lcp_proxy with

Makefile:1: /home/andreas/workspace/rosjava_core/rosjava_bootstrap/rosjava.mk: File or directory not found

I believe this is due to rosjava now using gradle instead of the previous rosmake driven build process, but unfortunately I've got no idea how to fix this. I don't want to revert back to an earlier version of rosjava.

Is it possible to use the current rosjava with nxt_lejos?

Best regards, Andreas

edit retag flag offensive close merge delete

5 Answers

Sort by ยป oldest newest most voted
0

answered 2012-06-14 02:00:43 -0500

LawrieGriffiths gravatar image

updated 2012-06-14 02:04:48 -0500

You can get a snapshot build from the SVN snapshot directory which will have getTurnRate in it. However, nxt_lejos_lcp_proxy does not work very well, and I may remove it. getTurnRate was a mistake and I will get rid of it some time. You are better off running nxt_lejos_proxy, which should work with lejos 0.9.1. This requires that you run the ROSResponder sample on the NXT. It works quite well for me. You will need to get ROSResponder from SVN. I need to find a solution to the hard-coded dependencies in the gradle build file. I am currently waiting for a response of my "rosjava message serialization problems" query before I do further work on nxt_lejos as it is stopping odometry and imu messages working properly, which means that parts of the navigation stack do not work.

edit flag offensive delete link more

Comments

Ignoring nxt_lejos_lcp_proxy in nxt_lejos/settings.gradle did the trick for me :) Thank you very much!

andreasw gravatar imageandreasw ( 2012-08-28 07:41:39 -0500 )edit
0

answered 2012-06-13 01:08:28 -0500

andreasw gravatar image

updated 2012-06-13 01:09:32 -0500

The problem were the pathes of the dependencies, e.g.:

dependencies {
  compile 'ros.rosjava_core:rosjava:0.0.0-SNAPSHOT'
  compile fileTree (dir: '/home/lejosdev/workspace/snapshot/lib/pc', includes: ['*.jar']) 
  compile fileTree (dir: '/home/lejosdev/workspace/snapshot/lib/pc/3rdparty', includes: ['*.jar']) 
}

should be corrected to match the path you've installed lejos (line 3) into and the path you've checked out nxt_lejos into (line 4).

The build.gradle files in nxt_lejos_proxy and nxt_lejos_map_server have to be updated accordingly.

Maybe this should be noted in the installation instructions.

The remaining problem is, that the DifferentialNavigationSystem references DifferentialPilot.getTurnRate() which isn't supposed to exist, according to 0.9.1beta Javadoc (nor leJOS_NXJ_0.9.1beta-3_source.tar.gz.

user@ubuntu:~/ros_workspace/nxt_lejos$ gradle installApp
> Building > :nxt_lejos_lcp_proxy:compileJava > Resolving dependencies ':nxt_lej:nxt_lejos_lcp_proxy:compileJava
DifferentialNavigationSystem.java:287: cannot find symbol
symbol  : method getTurnRate()
location: class lejos.robotics.navigation.DifferentialPilot
    od.getTwist().getTwist().getAngular().setZ((moving ? Math.toRadians(df.getTurnRate()): 0));

1 error

FAILURE: Build failed with an exception.

Is there something like a nightly I could try?

Thanks in advance!

Best regards, Andreas

edit flag offensive delete link more
0

answered 2012-06-12 03:38:23 -0500

andreasw gravatar image

Unfortunately, this doesn't seem to wokr for me.

I've installed leJOS following the tutorial and was able to run the HelloWorld program on the brick.

Building nxt_lejos as described here fails at compilation.

user@ubuntu:~/ros_workspace/nxt_lejos$ gradle installApp
> Building > :nxt_lejos_lcp_proxy:compileJava > Resolving dependencies ':nxt_lej:nxt_lejos_lcp_proxy:compileJava
LCPProxy.java:13: package lejos.nxt does not exist
import lejos.nxt.Sound;
                ^
LCPProxy.java:39: package nxt_lejos_msgs does not exist
import nxt_lejos_msgs.DNSCommand;
                   ^
LCPProxy.java:40: package nxt_lejos_msgs does not exist
import nxt_lejos_msgs.JointPosition;

...

LCPProxy.java:55: package com.esotericsoftware.yamlbeans does not exist
import com.esotericsoftware.yamlbeans.YamlReader;
                                     ^

DifferentialNavigationSystem.java:3: package lejos.nxt does not exist
import lejos.nxt.Motor;
                ^
DifferentialNavigationSystem.java:4: package lejos.robotics does not exist
import lejos.robotics.RegulatedMotor;
                     ^
DifferentialNavigationSystem.java:5: package lejos.robotics.localization does not exist
import lejos.robotics.localization.OdometryPoseProvider;

...

SoundSensor.java:3: package lejos.nxt does not exist
import lejos.nxt.SensorPort;

etc.

I suppose this is partially because you are missing the message representations in Java. Therefore one needs to reinstall rosjava_messages after checking out nxt_lejos into the ros workspace and the gradle nxt_lejos build should be able to find the nxt_lejos_msgs generated by rosjava.

Plus: There are hard coded pathes in */build.gradle files, e.g. (in nxt_lejos_proxy/build.gradle):

dependencies {
  compile 'ros.rosjava_core:rosjava:0.0.0-SNAPSHOT'
  compile fileTree (dir: '/home/lejosdev/workspace/snapshot/lib/pc', includes: ['*.jar'])
  compile fileTree (dir: '/home/lejosdev/workspace/snapshot/lib/pc/3rdparty', includes: ['*.jar']) 
}

Which doesn't seem proper either.

Did I misconfigure something?

Best regards, Andreas

edit flag offensive delete link more
0

answered 2012-05-20 00:45:50 -0500

andreasw gravatar image

Thank you!

edit flag offensive delete link more
0

answered 2012-05-17 23:53:15 -0500

LawrieGriffiths gravatar image

The version of nxt_lejos in SVN now supports the latest version of rosjava including gradle builds.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2012-04-25 02:30:16 -0500

Seen: 413 times

Last updated: Jun 14 '12