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

How to extract ROS parameters from a bag file and save them in .xlsx format?

asked 2022-05-13 11:02:22 -0500

Astronaut gravatar image

Hi

I have record a ROS bag file. But when I play it one terminal with

rosbag play my_file.bag

and in the another terminal I do

   rosparam list

its only shows these

/rosdistro
/roslaunch/uris/host_b_lenovo_ideapad_l340_15iwl__45865
/rosversion /run_id

but not the parameters I have it in my bag file. What is the problem? How can I get the parameters and extract/save them as .xlsx file?

Thanks

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
2

answered 2022-05-13 11:57:57 -0500

gvdhoorn gravatar image

but not the parameters I have it in my bag file. What is the problem? How can I get the parameters and extract/save them as .xlsx file?

you can't, as a .bag doesn't contain parameters.

If you need those, you'd have to save them using rosparam dump (or a similar command/tool).

edit flag offensive delete link more

Comments

Could you please mark the question as answered by ticking the checkmark (✓) to the left of the answer if you feel it has been answered? Thanks.

gvdhoorn gravatar image gvdhoorn  ( 2022-05-13 14:00:05 -0500 )edit

ok... How about some script to save them during recording the bag file?

Astronaut gravatar image Astronaut  ( 2022-05-14 02:09:14 -0500 )edit

I'm not sure I understand what you're asking for.

gvdhoorn gravatar image gvdhoorn  ( 2022-05-14 03:07:34 -0500 )edit

Actually I did record the parameters. When run the launch file at the beginning of the launching the launch file ros terminal shows the parameters.. So thats why must be in the bag file

Astronaut gravatar image Astronaut  ( 2022-05-14 03:08:46 -0500 )edit

Unless you're using a custom implementation/fork of rosbag, or something has changed recently (unlikely since ROS 1 is in maintenance mode), I don't believe rosbag record saves parameters.

See also #q325899 for an (admittedly) old Q&A about this same topic.

It's unclear to me what you mean by:

When run the launch file at the beginning of the launching the launch file ros terminal shows the parameters..

what exactly do you run, and what exactly do you see?

A copy-paste of the output you're referring to would perhaps help.

gvdhoorn gravatar image gvdhoorn  ( 2022-05-14 03:18:09 -0500 )edit

I run the launch file with several nodes and record a bag file in the same time.

Astronaut gravatar image Astronaut  ( 2022-05-14 06:02:25 -0500 )edit

Ok. But what made you conclude the parameters "must be in the bag file"?

roslaunch will always show parameters when you roslaunch some .launch file.

It does not automatically mean the parameters are in the .bag.

gvdhoorn gravatar image gvdhoorn  ( 2022-05-14 06:25:50 -0500 )edit

ok. So whet need to be done to include the parameters in the bag file or some how save them while recording the bag file?

Astronaut gravatar image Astronaut  ( 2022-05-15 01:10:49 -0500 )edit

Question Tools

Stats

Asked: 2022-05-13 11:02:22 -0500

Seen: 207 times

Last updated: May 14 '22