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

couchwarrior's profile - activity

2019-01-01 23:15:18 -0500 received badge  Famous Question (source)
2017-01-25 10:12:14 -0500 received badge  Notable Question (source)
2016-10-15 14:20:29 -0500 commented answer Rosjava ConnectException Eclipse without installing ROS

You're right. I meant I didn't need to go through the normal ROS installation

2016-10-14 21:21:19 -0500 received badge  Popular Question (source)
2016-10-14 21:21:07 -0500 received badge  Supporter (source)
2016-10-14 21:20:44 -0500 received badge  Scholar (source)
2016-10-14 21:20:36 -0500 commented answer Rosjava ConnectException Eclipse without installing ROS

Thanks, I also found this answer. Tested it and it works. No ROS needed :)

2016-10-13 22:13:27 -0500 commented answer Rosjava ConnectException Eclipse without installing ROS

How do I start a ROS Master?

2016-10-13 01:03:29 -0500 asked a question Rosjava ConnectException Eclipse without installing ROS

I'm running rosjava on Eclipse on a Mac without installing ROS, but just pulling in rosjava_core in my build.gradle, thinking this is possible after reading this tutorial http://wiki.ros.org/rosjava/Tutorials... . I create a RosTest class with a main method that just calls RosRun.main("ros.Talker"). Talker has code from the rosjava tutorial to publish Hello World every second. When Talker tries to instantiate a publisher or publish a message, not sure which, I get a ConnectException trying to connect to some socket. Any help is appreciated. I'm trying to avoid having to work on Linux and installing ROS, but since the code will eventually end up on a Raspberry Pi, it's not out of the picture. I would just love to believe that rosjava can be used like any other library without installing ros or pulling it down from github and running gradlew install.

My Build.gradle

repositories {
  maven {
    url "https://github.com/rosjava/rosjava_mvn_repo/raw/master"
  }
}

dependencies {
  compile 'org.ros.rosjava_core:rosjava:[0.2,0.3)'
  compile 'org.ros.rosjava_messages:geometry_msgs:[1.11,1.12)' }

My Error Log

Oct 12, 2016 10:05:56 PM org.ros.internal.node.topic.DefaultPublisher$1 onMasterRegistrationFailure

INFO: Publisher registration failed: Publisher<PublisherDefinition<PublisherIdentifier<NodeIdentifier</Talker, http://127.0.0.1:57539/>, TopicIdentifier</rosout>>, Topic<TopicIdentifier</rosout>, TopicDescription<rosgraph_msgs/Log, acffd30cd6b6de30f120938c17c593fb>>>>

Oct 12, 2016 10:06:01 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
INFO: I/O exception (java.net.ConnectException) caught when processing request: Connection refused
Oct 12, 2016 10:06:01 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
INFO: Retrying request
Oct 12, 2016 10:06:01 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
INFO: I/O exception (java.net.ConnectException) caught when processing request: Connection refused
Oct 12, 2016 10:06:01 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
INFO: Retrying request
Oct 12, 2016 10:06:01 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
INFO: I/O exception (java.net.ConnectException) caught when processing request: Connection refused
Oct 12, 2016 10:06:01 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
INFO: Retrying request
Oct 12, 2016 10:06:01 PM org.ros.internal.node.client.Registrar callMaster

SEVERE: Exception caught while communicating with master.

java.lang.RuntimeException: java.net.ConnectException: Connection refused
at org.ros.internal.node.xmlrpc.XmlRpcClientFactory$1.invoke(XmlRpcClientFactory.java:157)
at com.sun.proxy.$Proxy0.registerPublisher(Unknown Source)
at org.ros.internal.node.client.MasterClient.registerPublisher(MasterClient.java:144)
at org.ros.internal.node.client.Registrar$1$1.call(Registrar.java:138)
at org.ros.internal.node.client.Registrar$1$1.call(Registrar.java:135)
at org.ros.internal.node.client.Registrar.callMaster(Registrar.java:111)
at org.ros.internal.node.client.Registrar.access$100(Registrar.java:51)
at org.ros.internal.node.client.Registrar$1.call(Registrar.java:135)
at org.ros.internal.node.client.Registrar$1.call(Registrar.java:132)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter ...
(more)