Ask Your Question

Revision history [back]

And I would like to subscribe to the first ball in this message with message_filters

this is not supported.

However if I echo that topic in a terminal by rostopic echo /ball_states[0]/ball_state it works :)

yes, but that is a 'trick': rostopic subscribes in the regular way and then filters it's output for you, so it appears to subscribe to a field (which is impossible).

Does anyone know a fast workaround to this?

No.

Note something like this:

<remap from="ball_states[0]" to="ball1"/>

also will not work for me...:

No, because remapping fields is also not supported.

I would like to have a fast short solution that does not cost time....

Yes, wouldn't we all.

Perhaps it would be good if you can explain what it is that you are actually trying to do, instead of us trying to suggest alternatives for a solution you've already chosen.

And I would like to subscribe to the first ball in this message with message_filters

this is not supported.

However if I echo that topic in a terminal by rostopic echo /ball_states[0]/ball_state it works :)

yes, but that is a 'trick': rostopic subscribes in the regular way and then filters it's output for you, so it appears to subscribe to a field (which is impossible).

Does anyone know a fast workaround to this?

No.

Note something like this:

<remap from="ball_states[0]" to="ball1"/>

to="ball1"/>

also will not work for me...:

No, because remapping fields is also not supported.

I would like to have a fast short solution that does not cost time....

Yes, wouldn't we all.

Perhaps it would be good if you can explain what it is that you are actually trying to do, instead of us trying to suggest alternatives for a solution you've already chosen.

And I would like to subscribe to the first ball in this message with message_filters

this is not supported.

However if I echo that topic in a terminal by rostopic echo /ball_states[0]/ball_state it works :)

yes, but that is a 'trick': rostopic subscribes in the regular way and then filters it's output for you, so it appears to subscribe to a field (which is impossible).impossible). See #q232748 fi.

Does anyone know a fast workaround to this?

No.

Note something like this:

<remap from="ball_states[0]" to="ball1"/>

also will not work for me...:

No, because remapping fields is also not supported.

I would like to have a fast short solution that does not cost time....

Yes, wouldn't we all.

Perhaps it would be good if you can explain what it is that you are actually trying to do, instead of us trying to suggest alternatives for a solution you've already chosen.

And I would like to subscribe to the first ball in this message with message_filters

this is not supported.

However if I echo that topic in a terminal by rostopic echo /ball_states[0]/ball_state it works :)

yes, but that is a 'trick': rostopic subscribes in the regular way and then filters it's its output for you, so it appears to subscribe to a field (which is impossible). See #q232748 fi.

Does anyone know a fast workaround to this?

No.

Note something like this:

<remap from="ball_states[0]" to="ball1"/>

also will not work for me...:

No, because remapping fields is also not supported.

I would like to have a fast short solution that does not cost time....

Yes, wouldn't we all.

Perhaps it would be good if you can explain what it is that you are actually trying to do, instead of us trying to suggest alternatives for a solution you've already chosen.

And I would like to subscribe to the first ball in this message with message_filters

this is not supported.

However if I echo that topic in a terminal by rostopic echo /ball_states[0]/ball_state it works :)

yes, but that is a 'trick': rostopic subscribes in the regular way and then filters its output for you, so it appears to subscribe to a field (which is impossible). See #q232748 fi.

Does anyone know a fast workaround to this?

No.

Note something like this:

<remap from="ball_states[0]" to="ball1"/>

also will not work for me...:

No, because remapping fields is also not supported.

I would like to have a fast short solution that does not cost time....

Yes, wouldn't we all.

Perhaps it would be good if you can explain what it is that you are actually trying to do, instead of us trying to suggest alternatives for a solution you've already chosen.

Something that could perhaps work for you is to use the transform node from topic_tools to republish a single field as a separate message. See #q232748 again for how that could be done.