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

How to use an external library with a rosjava

asked 2011-12-31 07:56:11 -0500

Hi,

I am trying to modify the example: Talker.java to use an external library saved as .jar

In eclipse, I have updated buildPath, but when I execute roscore, system doesn't run.

I am not sure if I have to add some line in build.xml or the dependencies.xml

In build.xml I added:

  <path id="classpath">
    <pathelement path="${ros.compile.classpath}" />
    <pathelement location="/usr/local/lejos/lib/pc/pccomms.jar" />
  </path>

But roscore fails too.

How to solve my problem?

Happy new year

Cheers

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
1

answered 2011-12-31 12:08:22 -0500

I solved the problem updating manifest.xml

  <export>
    <!-- 
    <rosjava-src location="src/main/java" />
     -->
    <rosjava-src location="src" /> 
    <rosjava-pathelement location="target/" groupId="org.ros" artifactId="org.ros.rosjava.tutorial.pubsub" version="0.0.0" built="true" />
    <rosjava-pathelement location="/usr/local/lejos/lib/pc/pccomm.jar" />
 </export>
edit flag offensive delete link more

Comments

Excuse me what is the "target/" directory in this case?

Pickman gravatar image Pickman  ( 2016-08-04 12:16:46 -0500 )edit
0

answered 2011-12-31 08:14:06 -0500

I have checked that when I execute the command rosmake, my file .classpath is updated and the following files:

  • dependencies.xml
  • ros.properties

so how to add an external file in my project and where is the source of libraries included in dependencies.xml

edit flag offensive delete link more

Question Tools

Stats

Asked: 2011-12-31 07:56:11 -0500

Seen: 653 times

Last updated: Dec 31 '11