ROS2 add parameter to c++ and launch file
So I'm a novice when it comes to ROS2, but have some experience with ROS1. I've been trying to convert an existing project from ROS kinetic to ROS eloquent. In this project I've made a node in c++ that I would like to add a parameter to. In ROS1 this could be done using:
ros::param::param<bool>("/use_simulation_mode", simulation_mode_, false);
And then simply adding it to the launch file like so:
<param name="/use_simulation_mode" type="bool" value="true"/>
(and yes, it's a global parameter. I have learned this is no longer possible in ROS2, so I'll have to find another way there)
This no longer works with ROS2. As I've said, I'm quite the novice when it comes to ROS2 and am struggling to find information out there on how I can accomplish this. If anybody knows how to accomplish this and could show me, or point me in the direction of a tutorial or something the like, that would be much appreciated.