pass string parameter from command line using rosrun
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!
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.