Ask Your Question
0

reading header of message phython

asked 2013-02-07 03:24:37 -0500

Sentinal_Bias gravatar image

updated 2013-05-29 05:16:23 -0500

joq gravatar image

hi bellow is a link to the topic I am subscribing to

header header # timestamp in the header is the acquisition time of the first ray in the scan.

compact message definition (partial)

std_msgs/Header header
float32 angle_min
float32 angle_max

How do you access the time_stamp in the header? I know how to access other elements

def callback_lidar(data):

eg i would do angle = data.angle_min ect

ps for some reason when i write questions/paste code all the spacing gets ignored...

edit retag flag offensive close merge delete

Comments

would it be time_scan = data.stg_msg.time

Sentinal_Bias gravatar image Sentinal_Bias  ( 2013-02-07 07:55:26 -0500 )edit

Use the code button (10101010) to display code nicely.

dornhege gravatar image dornhege  ( 2013-02-09 07:27:18 -0500 )edit

Also, you can select a chunk of verbatim lines and press C-k to indent them all four spaces so they display correctly.

joq gravatar image joq  ( 2013-05-29 05:18:18 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
3

answered 2013-02-09 07:19:41 -0500

joq gravatar image

Assuming your message is in msg, the time stamp is: msg.header.stamp.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-02-07 03:24:37 -0500

Seen: 458 times

Last updated: May 29 '13