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

Hossein's profile - activity

2022-12-08 03:34:03 -0500 received badge  Good Question (source)
2020-10-05 17:30:49 -0500 received badge  Nice Question (source)
2020-02-08 07:55:51 -0500 received badge  Student (source)
2018-01-25 07:42:07 -0500 received badge  Famous Question (source)
2018-01-23 13:18:56 -0500 received badge  Famous Question (source)
2017-11-06 02:28:17 -0500 received badge  Taxonomist
2017-10-12 22:18:59 -0500 marked best answer rostopic echo only a msg of topic

I have a topic containing several messages. How can I use 'rostopic echo' to echo only one message.

For example this is my topic containing the following messages:

Header      hdr
int32       runlevel
int32       sublevel
int32       last_seq
int32[2]    type
int32[6]    pos
float32[18]   ori

and I am just interested to see only message pos on my terminal.

2017-08-05 16:49:19 -0500 received badge  Notable Question (source)
2017-03-16 11:51:37 -0500 received badge  Popular Question (source)
2017-02-12 06:34:46 -0500 marked best answer How to publish a ROS msg on Linux terminal

I have a ros msg as follows

int32 x int32 y char type

I want to give values to them on linux terminal. Something like this:

rostopic pub /topic message -- 2 3 'x'

But it doesn't work. I am using ROS Diamond.

2016-06-21 05:47:07 -0500 received badge  Famous Question (source)
2016-06-15 04:18:23 -0500 received badge  Famous Question (source)