ROS2 - YAML Parameters

Поделиться
HTML-код
  • Опубликовано: 23 ноя 2024

Комментарии • 18

  • @ifinatychal
    @ifinatychal 8 месяцев назад

    Thank you. Very helpful!
    We purchased the course.

  • @thomasluk4319
    @thomasluk4319 Год назад

    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.

    • @RoboticsBackEnd
      @RoboticsBackEnd  Год назад

      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)

    • @thomasluk4319
      @thomasluk4319 Год назад

      @@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.

  • @MrCynosure4sure
    @MrCynosure4sure 6 месяцев назад

    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.

    • @RoboticsBackEnd
      @RoboticsBackEnd  6 месяцев назад

      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.

  • @shrinivasiyengar5799
    @shrinivasiyengar5799 11 месяцев назад +1

    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.

    • @RoboticsBackEnd
      @RoboticsBackEnd  11 месяцев назад

      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 :)

  • @azmyin
    @azmyin Год назад

    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
      @RoboticsBackEnd  11 месяцев назад

      Yes, all you need to do is to add --ros-args, then -p param_name:=value, for each param

    • @azmyin
      @azmyin 11 месяцев назад

      @@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?

  • @smhhoseinee
    @smhhoseinee Год назад

    awesome. what if we want to do the same for a .YAML launch file?

  • @ChXXL
    @ChXXL Год назад

    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?

    • @RoboticsBackEnd
      @RoboticsBackEnd  Год назад

      Good question! Not sure as I haven't tried this. Keep me posted if you find the answer

  • @thomasluk4319
    @thomasluk4319 Год назад

    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?

  • @bckends_
    @bckends_ Год назад

    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

    • @RoboticsBackEnd
      @RoboticsBackEnd  Год назад

      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.

  • @muammarmufid1109
    @muammarmufid1109 9 месяцев назад

    hey i get 'parameter not set' in last sesion? do you know where is the problem?