Set parameters name like upper picture ("mode"),
and if write parameter name inside of <node> in launch file,
the parameter is different.
Need to set parameter outside of <node> list like below picture.
If set parameter inside <node> list in launch file, the namespace of pkg name is attached front of parameters name.
You need to declare NodeHandle like below.
ros::NodeHandle nh(astar);