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

distinguishing between openni_tracker broadcasts based on which user's information is being sent

asked 2011-07-18 06:04:57 -0600

qdocehf gravatar image

updated 2011-08-02 03:34:45 -0600

I am making a node that receives transforms from openni_tracker. Is there a way to make my node distinguish between transforms being sent for User 1, User 2, etc...?

edit retag flag offensive close merge delete

Comments

I tried to improve your title, but not sure if I interpreted you correctly. Please look at it and correct it if necessary.
Asomerville gravatar image Asomerville  ( 2011-07-18 06:26:25 -0600 )edit
Would editing the openni_tracker.cpp file to send an index with each transform to specify which user's data is being sent be fine? Or is it a bad idea to edit ROS code? I know that it is supposed to be read-only.
qdocehf gravatar image qdocehf  ( 2011-07-28 06:12:01 -0600 )edit
It would generally be a bad idea because it would be a maintenance nightmare for you. It would probably be much easier/better to just upgrade to the latest version of ROS since tfoote suggested it has the feature you're looking for.
Asomerville gravatar image Asomerville  ( 2011-07-28 06:14:52 -0600 )edit
The lines that my version is missing have no pertinence to this question. It was just something that I noticed while looking at Bemfica's answer. Anyways, I am running the latest version of ROS.
qdocehf gravatar image qdocehf  ( 2011-07-28 06:42:11 -0600 )edit
Also, what kind of maintenance problems would there be? It seems like it would be a pretty small change, but I guess I do not know what the effects of it would be.
qdocehf gravatar image qdocehf  ( 2011-07-28 06:45:23 -0600 )edit
If you wanted mainting the change as ROS got updated, you'd have to: 1) be certain that your change doesn't cause unforeseen consequences 1) continually make sure it worked with future versions. 2) be ok with your software only working with your custom verson of ROS
Asomerville gravatar image Asomerville  ( 2011-07-28 11:44:52 -0600 )edit
"Anyways, I am running the latest version of ROS" By which you mean latest diamondback version? latest electric-turtle version? latest unstable trunk head version?
Asomerville gravatar image Asomerville  ( 2011-07-28 11:45:27 -0600 )edit
I am running the latest version of diamondback. How do I even install electric-turtle? When I went to the installation page, diamondback was the only option it gave me.
qdocehf gravatar image qdocehf  ( 2011-07-29 01:27:26 -0600 )edit

3 Answers

Sort by ยป oldest newest most voted
0

answered 2011-09-02 11:42:50 -0600

kwc gravatar image

no activity in > 1 month, closing

edit flag offensive delete link more
1

answered 2011-07-18 06:42:06 -0600

Bemfica gravatar image

updated 2011-07-19 05:22:19 -0600

The users transforms are all published as you can see on the API. You could write a subscriber to read it. But something makes me think that there is an easier way to do it.

edit flag offensive delete link more

Comments

I already have it set up to receive the transforms. My problem is that I am not sure how to differentiate between the head for User 1, the head for User 2, the head for User 3, etc...
qdocehf gravatar image qdocehf  ( 2011-07-18 06:46:30 -0600 )edit
I just noticed that the code in your link is different from that of openni_tracker.cpp, the file that I got from downloading ROS. openni_tracker.cpp is missing lines 77, 78, 85, 86, 87, 88, 89, and 91. Also, lines 82 and 93 are slightly different.
qdocehf gravatar image qdocehf  ( 2011-07-18 06:49:29 -0600 )edit
What version have you downloaded? The online docs are generated from the newest version. Which suggests that this feature will be in the next release.
tfoote gravatar image tfoote  ( 2011-07-19 05:03:31 -0600 )edit
I downloaded diamondback just under a month ago. The differences are not so important to me though.
qdocehf gravatar image qdocehf  ( 2011-07-19 05:12:39 -0600 )edit
0

answered 2011-07-29 05:50:41 -0600

updated 2011-07-29 06:01:01 -0600

I've not used openni_tracker, but what I can tell from reading the code is that I think you should be able to use the StampedTransform's child_frame_id field to determine which user the transform is indicating.

Though, I was also under the impression that tf frames were supposed to be uniquely named so it may be a shortcoming/bug of the openni_tracker node. This post may be related:

edit flag offensive delete link more

Comments

Currently, openni_tracker is sending "head", "neck", "right elbow", etc... in the child_frame_id, which obviously does not specify between User 1, User 2, etc... I could change openni_tracker a bit so that it sends ("head" + (string) index) (yes, I know that you cannot cast to a string, it is just
qdocehf gravatar image qdocehf  ( 2011-07-29 06:34:37 -0600 )edit
easier to type that out), but you seemed to be saying that making any edits to ROS code could have unforeseen effects. Are you now saying that it is fine?
qdocehf gravatar image qdocehf  ( 2011-07-29 06:35:46 -0600 )edit

Question Tools

Stats

Asked: 2011-07-18 06:04:57 -0600

Seen: 422 times

Last updated: Sep 02 '11