Skip to content
This repository was archived by the owner on Aug 11, 2023. It is now read-only.

Commit 13d03b6

Browse files
authored
Merge pull request #225 from adamantivm/kinetic-updates
Updates for Kinetic release
2 parents 389b657 + 6274b19 commit 13d03b6

File tree

8 files changed

+184
-14
lines changed

8 files changed

+184
-14
lines changed

Diff for: CHANGELOG.rst

+5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
Changelog
33
=========
44

5+
0.3.0 (2016-12-13)
6+
------------------
7+
* Updates for Kinetic release.
8+
* NativeNodeMain for C++ node integration.
9+
510
0.2.1 (2015-02-25)
611
------------------
712
* allow setting of the talker topic name in pubsub tutorial.

Diff for: README.md

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
rosjava is the first pure Java implementation of ROS.
2+
3+
From [ROS.org](http://www.ros.org/wiki/): ROS is an open-source, meta-operating
4+
system for your robot. It provides the services you would expect from an
5+
operating system, including hardware abstraction, low-level device control,
6+
implementation of commonly-used functionality, message-passing between
7+
processes, and package management.
8+
9+
Developed at Google in cooperation with Willow Garage, rosjava enables
10+
integration of Android and ROS compatible robots. This project is under active
11+
development and currently alpha quality software. Please report bugs and feature
12+
requests on the [issues
13+
list](https://github.com/rosjava/rosjava/issues?state=open).
14+
15+
To get started, visit the
16+
[rosjava_core](http://rosjava.github.com/rosjava_core/latest) and
17+
[android_core](http://rosjava.github.com/android_core/latest) pages for
18+
documentation concerning the core libraries and examples. Also visit the roswiki
19+
[rosjava](http://wiki.ros.org/rosjava) and
20+
[android](http://wiki.ros.org/android) pages for more general rosjava-android
21+
information.
22+
23+
Still have questions? Check out the ros-users [discussion
24+
list](https://discourse.ros.org/c/rosjava), post questions to [ROS
25+
Answers](http://answers.ros.org/questions/) with the tag "rosjava," or join #ROS
26+
on irc.oftc.net.
27+
28+
rosjava was announced publicly during the [Cloud Robotics tech talk at Google
29+
I/O 2011](http://www.youtube.com/watch?feature=player_embedded&v=FxXBUp-4800).
30+
31+
Looking for a robot platform to experiment with ROS, Android, and cloud
32+
robotics? The [OSRF](http://www.osrfoundation.org/)
33+
[TurtleBot](http://wiki.ros.org/Robots/TurtleBot) is a great mobile perception
34+
platform for [getting started with robotics
35+
development](http://www.youtube.com/watch?feature=player_embedded&v=MOEjL8JDvd0).
36+
37+
### Branches ###
38+
39+
The master branch reflects the latest version of rosjava. All development
40+
happens on the master branch in the form of pull requests from developers.
41+
Unless you are developing rosjava itself, you should _not_ use the master
42+
branch.
43+
44+
Named branches are created whenever a new version of ROS is released. These
45+
branches are considered stable. No new features will be added to these branches,
46+
however, bug fixes may be cherry picked from master.
47+
48+
### Pull Requests ###
49+
50+
You must sign a Contributor License Agreement (CLA) before we can accept any
51+
code. The CLA protects you and us.
52+
53+
* If you are an individual writing original source code and you're sure you own
54+
the intellectual property, then you'll need to sign an [individual
55+
CLA](https://developers.google.com/open-source/cla/individual).
56+
* If you work for a company that wants to allow you to contribute your work to
57+
SL4A, then you'll need to sign a [corporate
58+
CLA](https://developers.google.com/open-source/cla/corporate).
59+
60+
Follow either of the two links above to access the appropriate CLA and
61+
instructions for how to sign and return it. Damon will respond on either github
62+
or email to confirm.

Diff for: build.gradle

+7-7
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ task wrapper(type: Wrapper) {
1919
}
2020

2121
buildscript {
22-
apply from: "https://github.com/rosjava/rosjava_bootstrap/raw/indigo/buildscript.gradle"
22+
apply from: "https://github.com/rosjava/rosjava_bootstrap/raw/kinetic/buildscript.gradle"
2323
}
2424

2525
apply plugin: "catkin"
@@ -31,16 +31,16 @@ allprojects {
3131

3232
subprojects {
3333
if (name != 'docs') {
34-
/*
34+
/*
3535
* The ros plugin configures a few things:
36-
*
36+
*
3737
* - local deployment repository : where it dumps the jars and packaged artifacts)
38-
* - local maven repositories : where it finds your locally installed/built artifacts)
38+
* - local maven repositories : where it finds your locally installed/built artifacts)
3939
* - external maven repositories : where it goes looking if it can't find dependencies locally
40-
*
40+
*
4141
* To modify, or add repos to the default external maven repositories list, pull request against this code:
42-
*
43-
* https://github.com/rosjava/rosjava_bootstrap/blob/indigo/gradle_plugins/src/main/groovy/org/ros/gradle_plugins/RosPlugin.groovy#L31
42+
*
43+
* https://github.com/rosjava/rosjava_bootstrap/blob/kinetic/gradle_plugins/src/main/groovy/org/ros/gradle_plugins/RosPlugin.groovy#L31
4444
*/
4545
apply plugin: "ros-java"
4646
apply plugin: "osgi"

Diff for: docs/src/main/sphinx/installing.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ you simply need to clone the github repository
2828
2929
git clone https://github.com/rosjava/rosjava_core
3030
cd rosjava_core
31-
git checkout -b indigo origin/indigo
31+
git checkout -b kinetic origin/kinetic
3232
3333
and proceed immediately to the section on :ref:`building`.
3434

Diff for: package.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0"?>
22
<package>
33
<name>rosjava_core</name>
4-
<version>0.2.1</version>
4+
<version>0.3.0</version>
55
<description>
66
An implementation of ROS in pure-Java with Android support.
77
</description>

Diff for: rosjava/build.gradle

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ dependencies {
1818
compile project(':apache_xmlrpc_common')
1919
compile project(':apache_xmlrpc_server')
2020
compile project(':apache_xmlrpc_client')
21-
compile 'org.ros.rosjava_bootstrap:message_generation:[0.2,0.3)'
22-
compile 'org.ros.rosjava_messages:rosjava_test_msgs:[0.2,0.3)'
21+
compile 'org.ros.rosjava_bootstrap:message_generation:[0.3,0.4)'
22+
compile 'org.ros.rosjava_messages:rosjava_test_msgs:[0.3,0.4)'
2323
compile 'org.ros.rosjava_messages:rosgraph_msgs:[1.11,1.12)'
24-
compile 'org.ros.rosjava_messages:geometry_msgs:[1.11,1.12)'
25-
compile 'org.ros.rosjava_messages:nav_msgs:[1.11,1.12)'
24+
compile 'org.ros.rosjava_messages:geometry_msgs:[1.12,1.13)'
25+
compile 'org.ros.rosjava_messages:nav_msgs:[1.12,1.13)'
2626
compile 'org.ros.rosjava_messages:tf2_msgs:[0.5,0.6)'
2727
compile 'dnsjava:dnsjava:2.1.1'
2828
compile 'org.apache.commons:com.springsource.org.apache.commons.logging:1.1.1'
+103
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
package org.ros.node;
2+
3+
import org.ros.node.AbstractNodeMain;
4+
import org.ros.node.ConnectedNode;
5+
import org.ros.node.Node;
6+
import org.ros.namespace.GraphName;
7+
8+
import org.apache.commons.logging.Log;
9+
import org.apache.commons.logging.LogFactory;
10+
11+
import java.util.List;
12+
import java.util.Map;
13+
14+
/**
15+
* A java wrapper to load and run a native-code ROS node.
16+
*
17+
* Note: there are no actual native methods declared in this class. We only define an interface. The native methods should be declared in the child class.
18+
*
19+
* @author [email protected] (Ernesto Corbellini)
20+
*/
21+
public abstract class NativeNodeMain extends AbstractNodeMain {
22+
23+
private Log log = LogFactory.getLog(NativeNodeMain.class);
24+
private String libName;
25+
private String masterUri = null;
26+
private String hostName = null;
27+
private String nodeName = null;
28+
private String[] remappingArguments;
29+
private boolean shuttingDown = false;
30+
31+
/**
32+
* @param libName
33+
* The name of the library to load.
34+
*
35+
* @param remappings
36+
* A string array with ROS argument remapping pairs in each element.
37+
**/
38+
public NativeNodeMain(String libName, String[] remappings) {
39+
this.libName = libName;
40+
41+
// if no remapping is needed, create an empty array
42+
if (remappings == null) {
43+
remappingArguments = new String[0];
44+
}
45+
46+
log.info("Trying to load native library '" + libName + "'...");
47+
try
48+
{
49+
System.loadLibrary(libName);
50+
}
51+
catch (SecurityException e)
52+
{
53+
log.info("Error loading library! SecurityException");
54+
}
55+
catch (UnsatisfiedLinkError e)
56+
{
57+
log.info("Error loading library! UnsatisfiedLinkError");
58+
}
59+
catch (NullPointerException e)
60+
{
61+
log.info("Error loading library! NullPointerException");
62+
}
63+
}
64+
65+
/**
66+
* @param libName
67+
* The name of the library to load.
68+
**/
69+
public NativeNodeMain(String libName) {
70+
this(libName, null);
71+
}
72+
73+
// These methods define the execution model interface for this node.
74+
protected abstract void execute(String rosMasterUri, String rosHostName, String rosNodeName, String[] remappingArguments);
75+
protected abstract void shutdown();
76+
77+
@Override
78+
public void onStart(final ConnectedNode connectedNode) {
79+
// retain important ROS info
80+
masterUri = connectedNode.getMasterUri().toString();
81+
hostName = connectedNode.getUri().getHost();
82+
nodeName = this.libName;
83+
84+
// create a new thread to execute the native code.
85+
new Thread() {
86+
@Override
87+
public void run() {
88+
execute(masterUri, hostName, nodeName, remappingArguments);
89+
90+
// node execution has finished so we propagate the shutdown sequence only if we aren't already shutting down for other reasons
91+
if(!shuttingDown) {
92+
connectedNode.shutdown();
93+
}
94+
}
95+
}.start();
96+
}
97+
98+
@Override
99+
public void onShutdown(Node node) {
100+
shuttingDown = true;
101+
shutdown();
102+
}
103+
}

Diff for: rosjava_tutorial_right_hand_rule/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ mainClassName = 'org.ros.RosRun'
2020

2121
dependencies {
2222
compile project(':rosjava')
23-
compile 'org.ros.rosjava_messages:sensor_msgs:[1.11,1.12)'
23+
compile 'org.ros.rosjava_messages:sensor_msgs:[1.12,1.13)'
2424
}
2525

0 commit comments

Comments
 (0)