Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build in dashing version failed,in Ubuntu 18.0.4 #86

Closed
year112 opened this issue Feb 21, 2020 · 9 comments
Closed

Build in dashing version failed,in Ubuntu 18.0.4 #86

year112 opened this issue Feb 21, 2020 · 9 comments

Comments

@year112
Copy link

year112 commented Feb 21, 2020

In README.md
mkdir -p ament_ws/src cd ament_ws curl -skL https://raw.githubusercontent.com/esteve/ament_java/master/ament_java.repos -o ament_java.repos vcs import src < ament_java.repos src/ament/ament_tools/scripts/ament.py build --symlink-install --isolated
and
mkdir -p ros2_java_ws/src cd ros2_java_ws curl -skL https://raw.githubusercontent.com/esteve/ros2_java/master/ros2_java_desktop.repos -o ros2_java_desktop.repos vcs import src < ros2_java_desktop.repos . ../ament_ws/install_isolated/local_setup.sh ament build --symlink-install --isolated
ament_java.repos and ros2_java_desktop.repos is out of date in 2018 .
When i build in dashing version ,there has too many mistakes.

1582254824(1)

how can i fix it? by the way ,when you will maintain the latest version of the instructions(dashing 2020 or 2019)

@nielstiben
Copy link
Contributor

I experienced similar issues. Have you tried cloning the dashing branch instead of the master branch?

Replace curl -skL https://raw.githubusercontent.com/esteve/ros2_java/master/ros2_java_desktop.repos -o ros2_java_desktop.repos
with curl -skL https://raw.githubusercontent.com/esteve/ros2_java/dashing/ros2_java_desktop.repos -o ros2_java_desktop.repos

@wilcobonestroo
Copy link

wilcobonestroo commented Mar 29, 2020

When I did the steps described by @nielstiben I ended up with two packages that could not build: rcljava_examples and test_msgs. The issue with test_msgs can be solved with #100 I can now build everything except for the examples with ament build --skip-packages rcljava_examples --symlink-install --isolated

@wilcobonestroo
Copy link

wilcobonestroo commented Mar 29, 2020

When I try to build jcljava_examples from the ros2_alpha8 branch, the error I get is

/home/ros/ros2_java_ws/build_isolated/rcljava_examples/src/main/java/org/ros2/rcljava/examples/Talker.java:18: error: cannot find symbol
import org.ros2.rcljava.Node;
                       ^ 

So, it seems that including the jcljava packages is not going well. At least, it can't find Node. I don't have much experience with Gradle, so I don't know how to solve this yet. Where can I update the settings for rcljava_examples so it can find the rcljava packages?

Edit: the include must be org.ros2.rcljava.node.Node;

Edit2: In the master branch, the above issues are solved. However, I get the error:

/home/ros/ros2_java_ws/src/ros2_java/ros2_java_examples/rcljava_examples/src/main/java/org/ros2/rcljava/examples/service/AddTwoIntsService.java:26: error: package example_interfaces.srv does not exist
      final example_interfaces.srv.AddTwoInts_Request request,
                                  ^

It doesn't know example_interfaces or example_interfaces.srv. What is this example_interfaces? Is it a class, variable, package? It looks like a package name, but where is it defined or where does it come from?

@wilcobonestroo
Copy link

wilcobonestroo commented Mar 29, 2020

@esteve I also see the example_interfaces.srv in your ROSCon presentation. However, I don't understand where it is defined. Can you help us with the questions above?

@wilcobonestroo
Copy link

@nielstiben If you delete the "addTwoInts" java files, then the other examples build. The subscriber_lambda and publisher_lambda work. With a little change also the subscriber_node and the publisher_node work.

@esteve
Copy link
Member

esteve commented Mar 30, 2020

@wilcobonestroo ros2_alpha8 branch is an old branch that predates the first official version of ROS 2, so it's not meant to be used, I've just removed it. The latest ROS 2 distro supported on master is Bouncy, but @jacobperron is working on adding support for Dashing and Eloquent in https://github.com/ros2-java/ros2_java/tree/dashing

@wilcobonestroo
Copy link

wilcobonestroo commented Mar 30, 2020

Thank you for your answers. Can you also give a hint about where example_interfaces.srv is defined? Once that error is fixed, the dashing version will build.

@jacobperron
Copy link
Contributor

See #101 for adding example_interfaces to the repos file.

@jacobperron
Copy link
Contributor

Dashing is EOL. Please try out the main branch with ROS Galactic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants