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

rlsutton1's profile - activity

2016-05-29 12:03:31 -0500 received badge  Popular Question (source)
2016-05-29 12:03:31 -0500 received badge  Notable Question (source)
2016-05-29 12:03:31 -0500 received badge  Famous Question (source)
2014-05-06 08:18:45 -0500 received badge  Famous Question (source)
2014-03-25 09:00:18 -0500 received badge  Notable Question (source)
2014-01-16 16:05:55 -0500 received badge  Popular Question (source)
2014-01-16 15:14:10 -0500 asked a question rosjava equivalent of TransformBroadcaster()

I'm converting the differential_drive (http://wiki.ros.org/differential_drive) package code from python to java.

My code along with the original python code can found at https://github.com/rlsutton1/RosJava-DifferentialDrive

I'm reasonably sure I have incorrectly translated this section of python code as I haven't been able to find a suitable replacement for self.odomBroadcaster.sendTransform and my replacement for TransformBroadcaster() is a bit of a guess. Can someone point me in the right direction?

The original Python code:

self.odomBroadcaster = TransformBroadcaster()

...   

# publish the odom information
quaternion = Quaternion()
quaternion.x = 0.0
quaternion.y = 0.0
quaternion.z = sin( self.th / 2 )
quaternion.w = cos( self.th / 2 )
self.odomBroadcaster.sendTransform(
     (self.x, self.y, 0),
     (quaternion.x, quaternion.y, quaternion.z, quaternion.w),
     rospy.Time.now(),
     self.base_frame_id,
     self.odom_frame_id
     )

My java code:

final Publisher<TransformStamped> odomBroadcaster 
    = connectedNode.newPublisher("testing/tf", TransformStamped._TYPE);

...

// publish the odom information
TransformStamped transform = odomBroadcaster.newMessage();
transform.getTransform().getRotation().setX(0);
transform.getTransform().getRotation().setY(0);
transform.getTransform().getRotation()
        .setZ(Math.sin(th / 2));
transform.getTransform().getRotation()
        .setW(Math.cos(th / 2));
transform.getTransform().getTranslation().setX(x);
transform.getTransform().getTranslation().setY(y);
transform.getTransform().getTranslation().setZ(0);
transform.getHeader().setStamp(new Time());
transform.setChildFrameId(odom_frame_id);
transform.getHeader().setFrameId(base_frame_id);
odomBroadcaster.publish(transform);

Thanks

2014-01-01 11:38:11 -0500 received badge  Editor (source)
2014-01-01 11:36:57 -0500 answered a question rosjava maven dependencies

Answering my own question for the benefit of others, and the possiblity that someone might point out any issues with what I have done.

I have given up trying to build ros_java and have found a maven repo which contains it...

After some digging around, I've added the following repo to my pom.xml

    <repository>
        <id>ros</id>
        <name>ros</name>
        <url>https://github.com/stonier/rosjava_mvn_repo/raw/master</url>
    </repository>

along with this dependency (which I had before)

 <dependency>
        <groupId>org.ros.rosjava_core</groupId>
        <artifactId>rosjava</artifactId>
        <version>0.1.6</version>
    </dependency>

I am now able to build my maven project and have sucessfully started a pair of nodes which talk to each other.

2013-12-31 12:53:39 -0500 asked a question rosjava maven build

I'm following the steps listed here http://rosjava.github.io/rosjava_core/hydro/installing.html

What I really want to do, is add some maven dependencies to my existing maven (eclipse) project and start writing and testing rosjava.

Issues I found:

  1. The eclipse target doesn't exist in the gradle build.
  2. The build creates some maven artifacts, but is quite there are quite a few missing.
  3. Gradle was not able to find dependencies that were not already in my maven repo.

I checked out rosjava_core from git, gradle was not able to find dependencies that were not already in my maven repo. I've manually added them to my maven repo.

Once rosjava_core was built, I worked out that it added the below artifact to my maven repo, so I added this dependency to my maven project...

    <dependency>
        <groupId>org.ros.rosjava_core</groupId>
        <artifactId>rosjava</artifactId>
        <version>0.1.6</version>
    </dependency>

My maven project build then failed with:

No versions are present in the repository for the artifact with a range [1.9,1.10)
  org.ros.rosjava_messages:rosgraph_msgs:jar:null

So I proceeded to checkout rosjava_messages and build it, which produced lots of messages like this:

Couldn't find gateway_msgs on the ROS_PACKAGE_PATH

I have a full install for ros and my ROS_PACKAGE_PATH seems to be correct : /opt/ros/hydro/share:/opt/ros/hydro/stacks

and finally the build failed with this message:

FAILURE: Build failed with an exception.

* What went wrong:
Could not copy MANIFEST.MF to '/home/rsutton/git/rosjava_messages/rosjava_test_msgs/build/tmp/jar/MANIFEST.MF'.

At this point I returned to try to build my project which failed with this message:

No versions are present in the repository for the artifact with a range [0.1,0.2)
  org.ros.rosjava_bootstrap:message_generation:jar:null

So I proceeded to checkout and build rosjava_bootstrap, which built without any issues. :)

returning to my project it now fails with this message:

No versions are present in the repository for the artifact with a range [0.4,0.5)
  org.ros.rosjava_messages:tf2_msgs:jar:null

I expect this last error is because of the failures building rosjava_messages.

In summary

  1. There are a couple of issues with following the instructions.
  2. It would be really useful if there maven dependencies for ros java in an accessible maven repo somewhere.

Finally can someone point me in the right direction.

Thanks

2013-12-31 12:53:06 -0500 asked a question rosjava maven dependencies

I'm following the steps listed here http://rosjava.github.io/rosjava_core/hydro/installing.html

What I really want to do, is add some maven dependencies to my existing maven (eclipse) project and start writing and testing rosjava.

Issues I found:

  1. The eclipse target doesn't exist in the gradle build.
  2. The build creates some maven artifacts, but is quite there are quite a few missing.
  3. Gradle was not able to find dependencies that were not already in my maven repo.

I checked out rosjava_core from git, gradle was not able to find dependencies that were not already in my maven repo. I've manually added them to my maven repo.

Once rosjava_core was built, I worked out that it added the below artifact to my maven repo, so I added this dependency to my maven project...

    <dependency>
        <groupId>org.ros.rosjava_core</groupId>
        <artifactId>rosjava</artifactId>
        <version>0.1.6</version>
    </dependency>

My maven project build then failed with:

No versions are present in the repository for the artifact with a range [1.9,1.10)
  org.ros.rosjava_messages:rosgraph_msgs:jar:null

So I proceeded to checkout rosjava_messages and build it, which produced lots of messages like this:

Couldn't find gateway_msgs on the ROS_PACKAGE_PATH

I have a full install for ros and my ROS_PACKAGE_PATH seems to be correct : /opt/ros/hydro/share:/opt/ros/hydro/stacks

and finally the build failed with this message:

FAILURE: Build failed with an exception.

* What went wrong:
Could not copy MANIFEST.MF to '/home/rsutton/git/rosjava_messages/rosjava_test_msgs/build/tmp/jar/MANIFEST.MF'.

At this point I returned to try to build my project which failed with this message:

No versions are present in the repository for the artifact with a range [0.1,0.2)
  org.ros.rosjava_bootstrap:message_generation:jar:null

So I proceeded to checkout and build rosjava_bootstrap, which built without any issues. :)

returning to my project it now fails with this message:

No versions are present in the repository for the artifact with a range [0.4,0.5)
  org.ros.rosjava_messages:tf2_msgs:jar:null

I expect this last error is because of the failures building rosjava_messages.

In summary

  1. There are a couple of issues with following the instructions.
  2. It would be really useful if there maven dependencies for ros java in an accessible maven repo somewhere.

Finally can someone point me in the right direction.

Thanks

2013-12-26 03:36:02 -0500 received badge  Famous Question (source)
2013-12-16 14:52:02 -0500 received badge  Notable Question (source)
2013-12-12 00:12:04 -0500 received badge  Student (source)
2013-12-12 00:11:46 -0500 received badge  Popular Question (source)
2013-12-09 13:38:22 -0500 commented answer Problem building rosjava-core - rosjava_core:unspecified

Thank you very much, problem solved.

2013-12-09 13:37:30 -0500 received badge  Supporter (source)
2013-12-08 00:22:09 -0500 asked a question Problem building rosjava-core - rosjava_core:unspecified

I'm trying to build rosjava_core by invoking ./gradlew

I'm running kubuntu 13.04, and have installed ros-hydro-desktop-full from the repos.

I've cloned rosjava_core from the git repo, and switched to the hydro branch.

this is the error I am getting.

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'rosjava_core'.
> Could not resolve all dependencies for configuration ':classpath'.
   > Could not find any version that matches org.ros.rosjava_bootstrap:gradle_plugins:[0.1,0.2).
     Required by:
         :rosjava_core:unspecified

On a side note, all I actually want to do is start writing a java node. Am I starting in the wrong place?

Thanks.