Ask Your Question
0

argument parsing

asked 2020-10-19 08:48:03 -0500

sobremesa gravatar image

I read the source code of image_saver.cpp

According to the docs, you should use command line like this :

rosrun image_view image_saver image:=/image/topic

but to parse the parameter, you should add a underline before ‘image’, I want to know the mechanism of this, thanks

edit retag flag offensive close merge delete

Comments

Do you mean node parameter assignment (see section 4) versus remapping? Without the underscore, ROS will apply and consume the remapping; with the underscore, you have to do getParam("~image") or similar yourself to read the value.

KenYN gravatar image KenYN  ( 2020-10-20 01:23:15 -0500 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2020-10-20 01:14:29 -0500

alex_ gravatar image

I suppose the topic name itself has a underline e.g. /_image/topic.

You can check if it is true by running the command

rostopic list
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

1 follower

Stats

Asked: 2020-10-19 08:48:03 -0500

Seen: 42 times

Last updated: Oct 20 '20