how to pass params from launch file to cpp file
hi all
i have some params which i defined in my launch file as below :
<node name="tfs" pkg="ctt_tools" type="tfs" respawn="true" />
<param name = "point_x_1" value = "23" />
<param name = "point_x_2" value = "26" />
<param name = "point_y_1" value = "-4.70" />
<param name = "point_y_2" value = "4.50" />
</node>
and i want to use these params in my cpp file in the code as below :
if(m.point.x > 23 && m.point.x < 26 && m.point.y > -4.70 && m.point.y < 4.50 )
{
for (int i=0; i<palletdrop.size();i++)
{
if(palletdrop[i].isInside(m.point.x,m.point.y))
{
palletdrop[i].setOccupied();
//std::cout<<"Another on area "<<i<<std::endl;
}
}
}
in place of values 23 , 26 etc i want o use params i defined in launch file... how can i do that ???
any suggestions?
thanks all ..