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

kluessi's profile - activity

2021-09-01 13:17:54 -0500 received badge  Taxonomist
2018-09-24 22:10:10 -0500 received badge  Famous Question (source)
2018-07-31 17:25:49 -0500 received badge  Notable Question (source)
2018-07-30 17:51:12 -0500 received badge  Popular Question (source)
2018-07-05 00:04:01 -0500 received badge  Enthusiast
2018-07-04 03:53:47 -0500 asked a question catkin-pkg distribution was not found

catkin-pkg distribution was not found Hi ROS-Community, I am using ubuntu 16.04 with ROS Kinetic build from source. To

2016-06-27 08:41:06 -0500 received badge  Famous Question (source)
2015-10-12 07:58:50 -0500 received badge  Notable Question (source)
2015-10-12 07:58:50 -0500 received badge  Popular Question (source)
2015-08-06 02:10:45 -0500 asked a question actionlib goalhandle.cancel() blocking function?

Hi,

its quite some time, but I have a question related to the question
http://answers.ros.org/question/13062...
asked some time ago.

It is maybe related to
http://answers.ros.org/question/52842...

The implementation using the goal handles on client and server side works quite well for using multiple goals.

I have a problem when canceling the goals. On the client side I use a for-loop iterating over the available goal handles (see below). For now, I cancel all goals, but later I just want to cancel a subset of the available goal handles.

When I am doing this the for loop stops at the execution of the cancel() function.

For my understanding this is threading problem. When the GoalHandle.cancel() function is executed. It executes the preemptCallback on the serve side, which will call the transistionCallback on the client side.

I came to the conclusion that the GoalHandle.cancel() function is blocking until the server has finished the preemptCallback and the transistionCallback on the client side. Due to the usage of the goalsMutex in my code on the client side the transistionCallback can't be executed, so my programm hangs in a deadlock.

I just want to know, why the GoalHandle.cancel() function is blocking. Shouldn't it be a non blocking funtion?

Like the ActionClient.cancelAllGoals() function, which is a non blocking function.

But when I use the ActionClient.cancelAllGoals() I can't tell on the server side that all goals shall be canceled, because I just receive one goal handle. Is there an option to detect on the server side if ActionClient.cancelAllGoals() has been called?

Thanks for your help.


Canceling the goal handles on the client side:

boost::unique_lock<boost::mutex> lock(goalsMutex);
int size = goalHandles.size();
for (unsigned int i = 0; i < size; ++i)
{

    std::cout << "C1" << std::endl;
    goalHandles[i].cancel();
    std::cout << "C2" << std::endl;
    goalHandles[i].reset();
    std::cout << "C3" << std::endl;
    goalHandles.erase(i);
}
lock.unlock();

Server Side PreemptCallback:

void ActionServer::preemptCallback(actionServer::GoalHandle &gh)
{
   gh.setCanceled();
}

The Transistion Callback:

void transistionCallback(actionClient::GoalHandle &gh)
{
  boost::unique_lock<boost::mutex> lock(goalsMutex);

  ... do some stuff

   lock.unlock();
}
2015-08-06 01:37:52 -0500 answered a question Advanced actionserver usage

Hi,

I know the question has been asked a long time ago, but I am trying to implement an action server using multiple goals.

I found this question and the answer very helpful, but now I am having some problems.

The implementation by storing the goal handles and client and server side works quite well.

On my client side I have a list of all GoalHandles currently used

for (unsigned int i = 0; i < goalHandles.size(); ++i) { std::cout << "C1" << std::endl; goalHandles[eid].cancel(); std::cout << "C2" << std::endl; goalHandles[eid].reset(); std::cout << "C3" << std::endl; goalHandles.erase(eid); }

2015-07-24 08:22:38 -0500 received badge  Nice Question (source)
2014-08-23 14:15:57 -0500 received badge  Famous Question (source)
2014-08-14 02:49:33 -0500 commented question ros indigo rviz performance displaying pointclouds 2x faster when compiled from_source

Thanks for the links William. Seem to be related.

2014-08-14 02:41:58 -0500 commented answer ros indigo rviz performance displaying pointclouds 2x faster when compiled from_source

I performed the tests again, this time deleting the build and devel folder from the workspace. Same results as above.

2014-08-13 23:04:09 -0500 received badge  Good Question (source)
2014-08-13 11:42:48 -0500 received badge  Nice Question (source)
2014-08-13 10:18:09 -0500 received badge  Notable Question (source)
2014-08-13 08:18:31 -0500 commented question ros indigo rviz performance displaying pointclouds 2x faster when compiled from_source

I tried your suggestion. For results please look in my post above. Not much difference. Still faster than the repository, but as fast as without SSE optimizations turned on.

2014-08-13 05:06:05 -0500 received badge  Popular Question (source)
2014-08-13 03:31:41 -0500 received badge  Editor (source)
2014-08-13 02:59:09 -0500 commented answer ros indigo rviz performance displaying pointclouds 2x faster when compiled from_source

I compiled rviz again using BUILD_TYPE Release and RelWithDebInfo, both without SSE optimizations.

I still get the performance of 30Hz on the desktop and 14Hz.

I will prepare a table containing all builds tested and edit my post above in a second.

2014-08-13 01:44:07 -0500 asked a question ros indigo rviz performance displaying pointclouds 2x faster when compiled from_source

Hi there,

as we started migrating our code to indigo yesterday we had performance issues, especially when working with pointclouds. The code compiled with catkin_make runs just with 1Hz, whereas using rosbuild we achieve 30Hz. We found out, related to the following topic:

http://answers.ros.org/question/71965...

that we need to enable compiler optimization by setting catkin_make -DCMAKE_BUILD_TYPE=Release and the code runs at the expected framerate of 30Hz.

Now to the topic:

Displaying just a pointcloud from the asus xtion in rviz installed from the repository gives us a performance of 14Hz on our desktop.

  • Intel i7-3770 3.4 GHz quad-core
  • Nvidia GeForce GTX660
  • 16GB ram
  • Ubuntu 14.04 - 64bit
  • ros-indigo

Knowing the above (catkin compiled code runs 3x slower) we build rviz from source with the following compiler options:

  • set(CMAKE_BUILD_TYPE RelWithDebInfo)
  • set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++0x -Wall -msse2 -msse3 -mssse3 -msse4 -msse4.2")

This gives us a performance of 30Hz displaying a pointcloud, resulting in a much smoother usage of rviz.

Evaluating the same on a laptop:

  • Intel i7-4600M, 2.1Ghz dual core
  • Intel HD Graphics 4600
  • 8 GB RAM
  • Ubuntu 14.04 - 64bit
  • ros indigo

rviz from repository: 4Hz vs. rviz from source 9Hz

EDIT I prepared a table containing all build tests I have done:

image description

This leads to the question: Are the ros-indigo packages really compiled with compiler optimizations turned on e.g. as Release?

Have a nice day!

2012-09-07 06:05:50 -0500 received badge  Famous Question (source)
2012-09-07 06:05:50 -0500 received badge  Notable Question (source)
2012-08-28 09:47:24 -0500 marked best answer "Assertion `!pthread_mutex_lock(&m)' failed." runtime error while working with custom message and kinect

Hi all,

I'm working with the Microsoft Kinect.

I'm using pointcloud_to_laserscan to retrieve a laserscan from kinect.

And there is another node which retrieves the rgb image from kinect for feature extraction and advertises the features using a custom ros message on a topic called "features".

Now I have another node. This node should subscribe to the pointcloud_to_laserscan and to the features topic using message_filters, because I need the laserscan and the features taken at the same time.

I tried to use the tutorial on http://www.ros.org/wiki/message_filters

I defined a sync policy:

typedef message_filters::sync_policies::ApproximateTime<sensor_msgs::LaserScan, myNode::myMsg> SyncLaserNodePolicy;

message_filters::Synchronizer<SyncLaserNodePolicy> sync2_;
message_filters::Subscriber<sensor_msgs::LaserScan> kinectLaser_sub;
message_filters::Subscriber<myNode::myMsg> feature_sub;

In the constructor of the node I initialize:

      kinectLaser_sub(n,"kinectLaser",1),
      feature_sub(n,"features",1),
      sync2_(SyncLaserNodePolicy(10),kinectLaser_sub,feature_sub),

My custom message is defined as:

Header header
surfKeyp2d[] keypoints2d
surfKeyp3d[] keypoints3d
surfDescMsg[] descriptors
uint32 number
sensor_msgs/Image image
geometry_msgs/TransformStamped trans

The code is compiling without errors, but when I try to run my node I get the following error:

myNode: /usr/include/boost/thread/pthread/mutex.hpp:50: 
void boost::mutex::lock():     Assertion `!pthread_mutex_lock(&m)' failed.
Aborted

Anybody have an idea whats wrong?

Thanks a lot!

2012-08-28 09:47:16 -0500 received badge  Student (source)
2012-08-28 09:29:02 -0500 received badge  Famous Question (source)
2012-06-13 01:52:01 -0500 received badge  Popular Question (source)
2012-02-02 23:15:17 -0500 received badge  Notable Question (source)
2011-11-01 10:31:39 -0500 received badge  Popular Question (source)
2011-09-02 11:01:10 -0500 marked best answer roswtf communcation error bug in Ubuntu 11.04

No activity in > 1 month, closing

2011-08-02 19:03:51 -0500 answered a question roswtf communcation error bug in Ubuntu 11.04

Hi,

here the output of your script:

[/rosout] ok
[/blub] ok
2011-08-01 19:22:21 -0500 asked a question roswtf communcation error bug in Ubuntu 11.04

Hi there,

I am using ros-diamondback on Ubuntu 11.04-64bit.

I am launching the following launch file:

<launch>
     <node pkg="tf type="static_transform_publisher" name="blub" args ="0 0 0 0 0 0 blub blub2 100" />
</launch>

In another terminal I run roswtf

Loaded plugin tf.tfwtf
No package or stack in context
================================================================================
Static checks summary:

No errors or warnings
================================================================================
Beginning tests of your ROS graph. These may take awhile...
analyzing graph...
... done analyzing graph
running graph rules...
... done running graph rules
running tf checks, this will take a second...
... tf checks complete

Online checks summary:

Found 2 error(s).

ERROR Communication with [/blub] raised an error: 
ERROR Communication with [/rosout] raised an error:

I tried to set ROS_IP and ROS_HOSTNAME by hand, but still the same error. The funny thing is, that there is no error. Everything works as expected. I can listen to the tf topic and receive data.

Can anybody tell me, why roswtf thinks that there is an error?

Thx

2011-08-01 19:19:51 -0500 answered a question "Assertion `!pthread_mutex_lock(&m)' failed." runtime error while working with custom message and kinect

Thanks for the replies.

I changed the order of initialization as mentioned by Dariush and it worked. Thx again.

2011-08-01 19:15:45 -0500 marked best answer "Assertion `!pthread_mutex_lock(&m)' failed." runtime error while working with custom message and kinect

Do you see any warnings while compiling this code? I would expect some warnings about the order in which you are initializing your class members.

In C++ member variables are initialized according the order of declaration, not the order you choose in the constructor. As you have declared the Sychronizer first, it's constructor will be called with uninitialized subscribers. That can cause all kind of nasticities, including the one you observed.

cheers Dariush

2011-08-01 19:15:45 -0500 received badge  Scholar (source)