jrosbridge

A Native Java EE rosbridge Client

License

License

GroupId

GroupId

edu.wpi.rail
ArtifactId

ArtifactId

jrosbridge
Last Version

Last Version

0.2.0
Release Date

Release Date

Type

Type

jar
Description

Description

jrosbridge
A Native Java EE rosbridge Client
Project URL

Project URL

https://github.com/WPI-RAIL/jrosbridge
Source Code Management

Source Code Management

https://github.com/WPI-RAIL/jrosbridge

Download jrosbridge

How to add to project

<!-- https://jarcasting.com/artifacts/edu.wpi.rail/jrosbridge/ -->
<dependency>
    <groupId>edu.wpi.rail</groupId>
    <artifactId>jrosbridge</artifactId>
    <version>0.2.0</version>
</dependency>
// https://jarcasting.com/artifacts/edu.wpi.rail/jrosbridge/
implementation 'edu.wpi.rail:jrosbridge:0.2.0'
// https://jarcasting.com/artifacts/edu.wpi.rail/jrosbridge/
implementation ("edu.wpi.rail:jrosbridge:0.2.0")
'edu.wpi.rail:jrosbridge:jar:0.2.0'
<dependency org="edu.wpi.rail" name="jrosbridge" rev="0.2.0">
  <artifact name="jrosbridge" type="jar" />
</dependency>
@Grapes(
@Grab(group='edu.wpi.rail', module='jrosbridge', version='0.2.0')
)
libraryDependencies += "edu.wpi.rail" % "jrosbridge" % "0.2.0"
[edu.wpi.rail/jrosbridge "0.2.0"]

Dependencies

compile (3)

Group / Artifact Type Version
org.glassfish : javax.json jar 1.0.4
org.glassfish.tyrus : tyrus-client jar 1.2.1
org.glassfish.tyrus : tyrus-container-grizzly jar 1.2.1

test (2)

Group / Artifact Type Version
junit : junit jar 4.11
org.glassfish.tyrus : tyrus-server jar 1.2.1

Project Modules

There are no modules declared in this project.

jrosbridge Build Status

A Native Java EE rosbridge Client

Example Usage

To include this library, use the following in your Maven configuration:

<dependency>
    <groupId>edu.wpi.rail</groupId>
    <artifactId>jrosbridge</artifactId>
    <version>0.2.0</version>
</dependency>
public static void main(String[] args) throws InterruptedException {
	Ros ros = new Ros("localhost");
	ros.connect();

	Topic echo = new Topic(ros, "/echo", "std_msgs/String");
	Message toSend = new Message("{\"data\": \"hello, world!\"}");
	echo.publish(toSend);

	Topic echoBack = new Topic(ros, "/echo_back", "std_msgs/String");
	echoBack.subscribe(new TopicCallback() {
		@Override
		public void handleMessage(Message message) {
			System.out.println("From ROS: " + message.toString());
		}
	});

	Service addTwoInts = new Service(ros, "/add_two_ints", "rospy_tutorials/AddTwoInts");

	ServiceRequest request = new ServiceRequest("{\"a\": 10, \"b\": 20}");
	ServiceResponse response = addTwoInts.callServiceAndWait(request);
	System.out.println(response.toString());
	
	ros.disconnect();
}

License

jrosbridge is released with a BSD license. For full terms and conditions, see the LICENSE file.

Authors

See the AUTHORS file for a full list of contributors.

Versions

Version
0.2.0
0.1.0
0.0.3
0.0.2
0.0.1