super cool, can u also demostrate a cpp version? I am working with a OSS ros2 driver, it only comes with a src folder and a cpp, it takes argv (CLI argument) as a parameter. I need to create a launch file and pass the param either in the launch or using param.yaml as you have demonstrated, but in cpp.
if you're asking about a Cpp launch file, unfortunately that doesn't exist. The 2 most common ways are to write launch files with Python or XML. Then, you can get the params in your node whether the node is in Cpp or Python (I have some tutorials about that on my website)
@@RoboticsBackEnd would you mind pointing those videos for me? I don't know the keywords to search. thanks. I am not asking about cpp launch file, instead how can I write a cpp node to get the data from params.
Thank you for the great tutorial. Does the config file need to be installed in the share folder? because this makes the process of changing parameters in .yaml file tedious as, compared to ROS1, you need to build the bring up package so config is installed in share, source it and then launch it. In ROS1 the launch and config files were not installed so you could quickly kill the node, change the parameter in the config file and re-launch. Any advice would be appreciated. Thank you once again for the excellent video.
Unfortunately you will have to build + source the workspace whenever you modify the YAML file (which makes it more tedious than ROS1). A solution to that is to specify a local path to a yaml file, that you use only for development purposes.
I spent an entire day wondering why my parameters file is not being discovered by the `launch_ros.actions.Node` function only to find out that IT HAS TO BE INSTALLED FIRST!! New to ROS2, coming from ROS1, it feels like everything is just needlessly complicated. Thanks for your video though, I would have probably spent another few hours without having found it out.
Yes, ROS2 is more complicated than ROS1 in many aspects. Also, spending "only" one day debugging something ROS-related is quite OK, sometimes it will take you a week(s?). Not meaning to discourage you, just be aware :)
Hi, thank you very much for this comprehensive tutorial. If I just want to pass parameters value directly using -ros-args, without needing to creating a yaml file, is that possible? I am thinking something along the lines of how argparse passes parameters directly from command line
@@RoboticsBackEnd yes that works. In future are you planning on a tutorial where we can pass arguments to a ros2 launch file via command line that in turn gets passed to the nodes?
Hi. Thank you for your awesome tutorials. I have a question about data types. Is it possible to add a list of dictionarys to the yaml file? I worked with this type of parameters with ros1 and now its somehow gone?
is there a way to create placeholders in the yaml file? so that i can share one value across multiple nodes in params.yaml and have to change it only once
what you can do is to have several yaml files that you include in a launch file. You can have one yaml file that contains "global" values, and the other ones that are more specific.
Thank you. Very helpful!
We purchased the course.
awesome. what if we want to do the same for a .YAML launch file?
super cool, can u also demostrate a cpp version? I am working with a OSS ros2 driver, it only comes with a src folder and a cpp, it takes argv (CLI argument) as a parameter. I need to create a launch file and pass the param either in the launch or using param.yaml as you have demonstrated, but in cpp.
if you're asking about a Cpp launch file, unfortunately that doesn't exist. The 2 most common ways are to write launch files with Python or XML. Then, you can get the params in your node whether the node is in Cpp or Python (I have some tutorials about that on my website)
@@RoboticsBackEnd would you mind pointing those videos for me? I don't know the keywords to search. thanks.
I am not asking about cpp launch file, instead how can I write a cpp node to get the data from params.
Thank you for the great tutorial.
Does the config file need to be installed in the share folder? because this makes the process of changing parameters in .yaml file tedious as, compared to ROS1, you need to build the bring up package so config is installed in share, source it and then launch it. In ROS1 the launch and config files were not installed so you could quickly kill the node, change the parameter in the config file and re-launch. Any advice would be appreciated. Thank you once again for the excellent video.
Unfortunately you will have to build + source the workspace whenever you modify the YAML file (which makes it more tedious than ROS1).
A solution to that is to specify a local path to a yaml file, that you use only for development purposes.
I spent an entire day wondering why my parameters file is not being discovered by the `launch_ros.actions.Node` function only to find out that IT HAS TO BE INSTALLED FIRST!!
New to ROS2, coming from ROS1, it feels like everything is just needlessly complicated.
Thanks for your video though, I would have probably spent another few hours without having found it out.
Yes, ROS2 is more complicated than ROS1 in many aspects. Also, spending "only" one day debugging something ROS-related is quite OK, sometimes it will take you a week(s?). Not meaning to discourage you, just be aware :)
Hi, thank you very much for this comprehensive tutorial. If I just want to pass parameters value directly using -ros-args, without needing to creating a yaml file, is that possible? I am thinking something along the lines of how argparse passes parameters directly from command line
Yes, all you need to do is to add --ros-args, then -p param_name:=value, for each param
@@RoboticsBackEnd yes that works. In future are you planning on a tutorial where we can pass arguments to a ros2 launch file via command line that in turn gets passed to the nodes?
Hi. Thank you for your awesome tutorials.
I have a question about data types. Is it possible to add a list of dictionarys to the yaml file?
I worked with this type of parameters with ros1 and now its somehow gone?
Good question! Not sure as I haven't tried this. Keep me posted if you find the answer
is there a way to create placeholders in the yaml file? so that i can share one value across multiple nodes in params.yaml and have to change it only once
what you can do is to have several yaml files that you include in a launch file. You can have one yaml file that contains "global" values, and the other ones that are more specific.
i see some param.ymal write like this:
/**:
ros__parameters:
What is the first line mean /**? does it mean all the node can call this param file?
hey i get 'parameter not set' in last sesion? do you know where is the problem?