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

Markus Eich's profile - activity

2017-01-23 11:55:14 -0500 received badge  Good Question (source)
2016-12-12 18:48:17 -0500 commented answer Moveit PlanningSceneInterface addBox not showing in Rviz

Only thing missing is: How can I visualise the added scene in RVIZ? The objects are there (I can see the collision when moving the arm) but the scene in rviz is not updated. Any ideas?

2016-12-12 18:44:58 -0500 commented answer Moveit PlanningSceneInterface addBox not showing in Rviz

Darn. I was struggling one week to solve this issue!!. My objects were simply not added. Is this somewhere in the tutorial? How did you find out about this little hack? Thnx for posting.

2016-06-30 07:51:56 -0500 received badge  Nice Question (source)
2016-04-12 14:48:04 -0500 received badge  Famous Question (source)
2016-02-23 22:15:31 -0500 received badge  Notable Question (source)
2016-01-26 00:36:28 -0500 received badge  Taxonomist
2015-12-16 06:09:09 -0500 received badge  Popular Question (source)
2015-11-23 22:42:03 -0500 received badge  Enthusiast
2015-11-18 23:29:42 -0500 asked a question Python ApproximateTimeSynchronizer not working

Dear all,

I want to subscribe to synchronized depth and rgb images using message_filters and ApproximateTImeSynchoronizer.

def rgb_callback(image):
     rospy.loginfo("got RGB image")

def depth_callback(image):
    rospy.loginfo("got DEPTH image")

def scan_callback(image,depth):
    rospy.loginfo("got synched images")


def hand_tracker():

    rospy.init_node('hand_tracker')
    image_sub=message_filters.Subscriber('/kinect2/hd/image_color_rect',Image)
    depth_sub=message_filters.Subscriber('/kinect2/hd/image_dept_rect',Image)        

    rospy.Subscriber('/kinect2/hd/image_color_rect',Image,rgb_callback)    
    rospy.Subscriber('/kinect2/hd/image_depth_rect',Image,depth_callback)    

    ts=message_filters.ApproximateTimeSynchronizer([image_sub,depth_sub],10,1)    
    ts.registerCallback(scan_callback)
    try:
        rospy.spin()
    except KeyboardInterrupt:        
        print "Shutting down"

The problem is that rgb callback and depth callback are called, but the scan_callback using ApproximateTimeSynchronizer not. Is it a bug or is there something I am doing wrong?

2015-08-31 21:04:13 -0500 marked best answer PCLVisualizer within a ROS node does not respond

Dear all,

I want to visualize my pointcloud data and some objects within a ROS node. The node receives the data via a ROS Topic. The problem I have is how to integrate the viewer properly. In the main class I am using a member variable for the viewer and one thread which should update the view.

boost::shared_ptr<boost::thread> visualizer_thread_;
boost::shared_ptr<pcl::visualization::PCLVisualizer> viewer_;

In the constructor of my class (basically a segmentation class) I initialize the viewer and start the thread to do the update.

 viewer_= boost::make_shared<pcl::visualization::PCLVisualizer>("Cylinder Viewer");
 visualizer_thread_.reset(new boost::thread(boost::bind(&CylinderSegmentation::visualize,this)));

In the visualization thread I do basically an spin operation on the view

/** Visualizer Thread for the objects
*
*/
void visualize(){
   ros::Rate r(40);
   viewer_->setBackgroundColor(10.5,0.5,1.0);
   viewer_->addCoordinateSystem(1.0);     
   while (!viewer_->wasStopped()){
      viewer_->spinOnce();
      r.sleep();
   }     
   std::cout<<"Stopped the Viewer"<<std::endl;
 }

When I close the viewer window, I receive the message "Stopped the Viewer" but the window does not close. I cannot even add something to the window to be shown. Is there something wrong I do about the usage of the PCLViewer?

Cheers,

Markus

2015-02-03 08:48:48 -0500 received badge  Famous Question (source)
2014-10-10 02:41:46 -0500 received badge  Notable Question (source)
2014-10-09 10:12:24 -0500 commented answer Problem running SBPL on ARM (Odroid-U3)

I am using the genprim_unicylce method. When I set the numberofangles=8, I can generate the primitives but the planner simply crashes.

2014-10-09 10:11:11 -0500 commented answer Problem running SBPL on ARM (Odroid-U3)

This does not seem to help much.

  • compiling with release did not improve the issue
  • Set Global planner time out to 10 seconds. still no result
  • I have set the resolution to 10cm. Still no solution

Decreasing the number of primitives is where I am currently stuck.

2014-10-09 10:11:11 -0500 received badge  Commentator
2014-10-08 11:09:27 -0500 received badge  Popular Question (source)
2014-10-07 09:23:12 -0500 asked a question Problem running SBPL on ARM (Odroid-U3)

Hi all,

I am facing a strange problem. I am using ROS move_base and SBPL for motion-primitive-based path planning. I have generated some motion primitives for SBPL and everything works fine using my laptop (Intel i5, Ubuntu 14.04). The robot plans the path and moves fine along the path.

Now I am using the very same modules (and configs) on my Odroid U3 (ARM quadcore) and it cannot find a solution. Top shows that the core is at 100%. Here is the output from move_base

[ INFO] [1412691428.999248673]: Using plugin "obstacle_layer"

[ INFO] [1412691429.127272381]: Subscribed to Topics:

[ INFO] [1412691429.172789423]: Using plugin "inflation_layer"

[ INFO] [1412691429.443358089]: Name is SBPLLatticePlanner

[ INFO] [1412691430.931921673]: Planning with ARA*

[ INFO] [1412691430.932365757]: [sbpl_lattice_planner] Initialized successfully

[ INFO] [1412691430.989290632]: Using plugin "obstacle_layer"

[ INFO] [1412691431.241103424]: Subscribed to Topics:

[ INFO] [1412691431.286346674]: Using plugin "inflation_layer"

[ INFO] [1412691431.688199674]: Created local_planner base_local_planner/TrajectoryPlannerROS

[ INFO] [1412691431.732307049]: Sim period is set to 0.10

[ INFO] [1412691432.897083008]: odom received!

[ INFO] [1412691492.209781994]: [sbpl_lattice_planner] getting start point (3.48925,-0.84064) goal point (2.00517,-1.3133) [ INFO] [1412691502.490063749]: Solution not found

[ WARN] [1412691502.492333249]: Map update loop missed its desired rate of 2.0000Hz... the loop actually took 10.0025 seconds

[ INFO] [1412691502.492543791]: [sbpl_lattice_planner] getting start point (3.48925,-0.84064) goal point (2.00517,-1.3133)

[ INFO] [1412691512.771037004]: Solution not found

I am using the following repos of the modules:

ROS indigo

sbpl_lattice_planner: https://github.com/meyerj/sbpl_lattic...

sbpl: https://github.com/sbpl/sbpl.git

Any ideas? I actually have no Idea where to start looking.

Cheers,

Markus

2014-04-20 12:52:34 -0500 marked best answer Running a rosjava node

I managed to build my own rosnode with the new gradle build system. But when I run my node with the command ./build/scripts/mynode org.ros.mynode I get the following error

   Exception in thread "main" java.lang.NoClassDefFoundError: org/ros/RosRun
   Caused by: java.lang.ClassNotFoundException: org.ros.RosRun
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)

The same happens if I try to run the pub_sub tutorial with the command

  ./build/scripts/rosjava_tutorial_pubsub org.ros.rosjava_tutorial_pubsub.Talker

After having a look at the generated script, it just sets the classpath to

   CLASSPATH=$APP_HOME/lib/rosjava_tutorial_pubsub-0.0.0-SNAPSHOT.jar:$....

It seems that the class path is not set correctly, because APP_HOME points to pwd -P and there is no lib folder. What am I doing wrong in the execution of the rosnodes?

2014-04-20 12:51:28 -0500 marked best answer Rosjava building test fails

I recently upgraded to the gradle version of rosjava. When I build the test with #./gradlew test I got 16 errors. I checked the report and saw that the following errors occured:

MessageSerializationTest.testBool
MessageSerializationTest.testDuration
MessageSerializationTest.testFloat32
MessageSerializationTest.testFloat64
MessageSerializationTest.testInt16
MessageSerializationTest.testInt32
MessageSerializationTest.testInt64
MessageSerializationTest.testInt8
MessageSerializationTest.testNestedMessage
MessageSerializationTest.testNestedMessageArray
MessageSerializationTest.testString
MessageSerializationTest.testTime
MessageSerializationTest.testUInt16
MessageSerializationTest.testUInt32
MessageSerializationTest.testUInt64
MessageSerializationTest.testUint8

When checking all the errors, it says that the std_msgs/msg/ doesn't exist. (e.g) "java.util.NoSuchElementException: Resource does not exist: /std_msgs/msg/Bool.msg"

ROS itself is installed and runns smoothly.

I am using ROS Fuerte on Ubuntu 12.04LTS.

2014-04-20 12:50:59 -0500 marked best answer External dependencies with rosjava

Dear all, I am a bit confused with the new gradle build system. In the old version of rosjava, I could define my dependencies on external jars within the Manifest file with something like

        <rosjava-pathelement location="/home/eich/workspace/Cylinder_Reasoner/cylinderreasoner.jar" />

This was than included into the auto-generated property files. How can I set my dependencies with the new gradle build system? The corresponding jar files of the libs are in the main folder of the package. Any Ideas?

Cheers, Markus

2014-04-20 12:50:58 -0500 marked best answer Building new rosjava package

I try to build a new ros package using rosjava. I followed the tutorial and stored my source code in the new package (i.e. /src/main/java/org/ros/reasoner/). Than I took the sample file for build.gradle

apply plugin: 'application'

mainClassName = 'org.ros.RosRun'

dependencies {
  compile 'ros.rosjava_core:rosjava:0.0.0-SNAPSHOT'
}

When running my gradle with "gradle build" I get the following error.

  :compileJava

  FAILURE: Build failed with an exception.

  * What went wrong:
  Could not resolve all dependencies for configuration ':compile'.
  > Could not find group:ros.rosjava_core, module:rosjava, version:0.0.0-SNAPSHOT.
    Required by:
        :rosjava_cylinder_reasoner:unspecified

rosjava was build according to the tutorial with gradlew install and all went right. What is wrong with my approach?

Cheers,

Markus

2014-04-20 12:41:35 -0500 marked best answer rosjava: calling rosservice fails

Dear all,

I made my first homebrewed rosservice with Java. I have generated my custom service GetCylinders.srv

 ---
 string name
 float32 likelihood

which should return a name and a likelihood with an empty request. I have generated the service and included it in my server like this:

 import org.ros.service.reasoner_msgs.*;

   ServiceServer<org.ros.service.reasoner_msgs.GetCylinders.Request, org.ros.service.reasoner_msgs.GetCylinders.Response> server = node.newServiceServer(
        "callme", "reasoner_msgs/GetCylinders",

        new ServiceResponseBuilder<org.ros.service.reasoner_msgs.GetCylinders.Request, org.ros.service.reasoner_msgs.GetCylinders.Response>() {
          @Override
          public org.ros.service.reasoner_msgs.GetCylinders.Response build(org.ros.service.reasoner_msgs.GetCylinders.Request request) throws ServiceException {
            org.ros.service.reasoner_msgs.GetCylinders.Response response = new org.ros.service.reasoner_msgs.GetCylinders.Response();
            // ...
            response.name="CylinderA";
            response.likelihood=(float) 0.7;

            return response;
          }
        }
);

When I start the node the service /callme shows up. Well that is fine. But if I use rosservice call /callme i get an error. Have I done something wrong in the setup of the service? The error message I get is

 Traceback (most recent call last):
 File "/opt/ros/electric/ros/bin/rosservice", line 46, in <module>
rosservice.rosservicemain()
 File "/opt/ros/electric/stacks/ros_comm/tools/rosservice/src/rosservice.py", line 731, in rosservicemain
_rosservice_cmd_call(argv)
 File "/opt/ros/electric/stacks/ros_comm/tools/rosservice/src/rosservice.py", line 586, in _rosservice_cmd_call
service_class = get_service_class_by_name(service_name)
 File "/opt/ros/electric/stacks/ros_comm/tools/rosservice/src/rosservice.py", line 357, in get_service_class_by_name
service_type = get_service_type(service_name)
 File "/opt/ros/electric/stacks/ros_comm/tools/rosservice/src/rosservice.py", line 141, in get_service_type
return get_service_headers(service_name, service_uri).get('type', None)
 File "/opt/ros/electric/stacks/ros_comm/tools/rosservice/src/rosservice.py", line 113, in get_service_headers
return roslib.network.read_ros_handshake_header(s, cStringIO.StringIO(), 2048)
 File "/opt/ros/electric/ros/core/roslib/src/roslib/network.py", line 367, in read_ros_handshake_header
raise ROSHandshakeException("connection from sender terminated before handshake header received. %s bytes were received. Please check sender for additional details."%b.tell())
 roslib.network.ROSHandshakeException: connection from sender terminated before handshake header received. 0 bytes were received. Please check sender for additional details.

Can anyone help me in solving this problem?

2014-04-20 12:39:36 -0500 marked best answer Rosjava: Problem sending a string to the sample

Dear all,

I am playing around with the rosjava tutorial. When running the Listener node together with the talker node it works fine and the Hello world is printed out. But if I run

rostopic pub /chatter std_msgs/String "Hello"

It will not work anymore. The listener throws the following exceptions:

01.02.2012 14:52:15 org.ros.internal.node.topic.UpdatePublisherRunnable run
SCHWERWIEGEND: java.lang.RuntimeException: java.net.ConnectException: Connection refused
01.02.2012 14:52:17 org.ros.internal.node.topic.UpdatePublisherRunnable run
SCHWERWIEGEND: org.ros.exception.RosRuntimeException: Connection exception:   eich-ThinkPad/192.168.103.42:39099
01.02.2012 14:52:17 org.ros.internal.transport.ConnectionTrackingHandler exceptionCaught
SCHWERWIEGEND: Channel exception: java.net.NoRouteToHostException: No route to host
01.02.2012 14:52:17 org.ros.internal.transport.ConnectionTrackingHandler exceptionCaught
SCHWERWIEGEND: Channel exception: java.net.NoRouteToHostException: No route to host
2014-04-20 12:39:36 -0500 marked best answer Rosjava: How to generate new services

Dear all,

I am using rosjava to set up a service. For testing I have set up a package with roscreate-pkg. (GetCylinders.srv) The service was generated and the package was build with rosmake. All cpp files are generated.

#no request
---
string name
float32 likelihood

I have already set the dependency in the rosjava service (i.e. reasoner_msgs). Here is the manifest file I use for the service.

<depend package="rosjava" />
<depend package="std_msgs" />
<depend package="reasoner_msgs" />

How do I proceed further? How can I tell rosjava to generate the corresponding java service? Is there a step by step manual somewhere?

Cheers,

Markus

2014-04-20 12:27:49 -0500 marked best answer Service in ROSJAVA. How to start a ServiceServer

I have the problem of generating a service with ros java. I ended up with modifying the pubsub example. I read the javadoc and I ended at the node.newServiceServer part. I started to write my first service with empty request and empty response.

  ServiceServer<org.ros.message.std_msgs.Empty, org.ros.message.std_msgs.Empty> server = node.newServiceServer("callme",)

According to the javadoc, the params are

  • Type Parameters:
    • RequestType - type for the request
    • ResponseType - type for the response
  • Parameters:
    • serviceName - the name of the service
    • serviceType - the type of the service (e.g. "test_ros/AddTwoInts")
    • responseBuilder - called for every request to build a response

Now I am lost. What is the serviceType and what the responseBuilder?????? Can anyone complete my simple line if I want to have a simple service printing "hello world" if the service /callme is called? Thank you.

2014-04-20 12:27:48 -0500 marked best answer ROSJAVA and External Libraries (again)

Dear all,

I try to include an external library to the example of rosjava_tutorial_pubsub_Listener.

I modified the code as follows:

 package org.ros.tutorials.pubsub;
 import org.apache.commons.logging.Log;
 import org.ros.message.MessageListener;
 import org.ros.namespace.GraphName;
 import org.ros.node.Node;
 import org.ros.node.NodeMain;
 import org.ros.node.topic.Subscriber;
 import cylinder_reasoner.*;

 /**
 * This is a simple rosjava {@link Subscriber} {@link Node}. It assumes an
 * external roscore is already running.
 * 
 * @author damonkohler@google.com (Damon Kohler)
 */
 public class Listener implements NodeMain {

  @Override
  public GraphName getDefaultNodeName() {
  return new GraphName("rosjava_tutorial_pubsub/listener");
  }

   @Override
   public void onStart(Node node) {
   final Log log = node.getLog();
   CylinderReasoner reasoner=new CylinderReasoner();
   reasoner.doReasoning("//home//eich//Cylinders.txt");

   Subscriber<org.ros.message.std_msgs.String> subscriber =
     node.newSubscriber("chatter", "std_msgs/String");
    subscriber.addMessageListener(new MessageListener<org.ros.message.std_msgs.String>()   
   {
    @Override
    public void onNewMessage(org.ros.message.std_msgs.String message) {
     log.info("I heard: \"" + message.data + "\"");
  }
});
}`

Than I added the following line to the manifest.txt

<rosjava-pathelement location="/home/eich/Test.jar" />

Test Test.jar contains the Package cylinder_reasoner.CylinderReasoner.

Problem is I cannot compile. The error is that

Listener.java:25: package cylinder_reasoner does not exist

Do I have to set the jar file somewhere else as well? Or only in the manifest. After calling rosmake, the .classpath is updated correctly, but it cannot find the package.

Do you have any ideas?

Thank you

2014-04-20 06:51:19 -0500 marked best answer Running rosjava node from launchfile

Dear all,

I try to run my rosjava node from within a launchfile. My launchfile looks like this

 <launch>
 <master auto="start"/>
 <node pkg="rosjava_cylinder_reasoner" type="rosjava_cylinder_reasoner"  name="cylinder_reasoner" args="de.dfki.reasoner.Service" 
 respawn="false" output="screen"/>

The problem is that there are two generated wrapper scripts (generated from gradle) which execute the node, one is in build/install/... one is in build/scripts/. Per default roslaunch wants to execute the script in /scripts/ which results in an error because the relative path to lib (the classpath) is not set. The only solution I found so far is to delete the wrapper script from the /build/scripts/ directory. Is there any other solution to point roslaunch to the right wrapper script?