pass string parameter from command line using rosrun

asked 2018-08-11 11:23:19 -0600

GXY gravatar image

In OpenCV, it's common that a program takes a command line parameter as the input image, such as "Mat source =cv::imread(argv[1],...)", now if I turn the program into a ros node, how can i achieve the same result with rosrun?, thanks in advance!

edit retag flag offensive close merge delete

Comments

Arguments to ROS nodes are provided by [argumentname]:=[value] and can have the string type. How to access your own command line options in a C++ node can be found here.

bouke gravatar image bouke  ( 2018-08-13 04:41:46 -0600 )edit