Ask Your Question
0

getParam questions

asked 2017-10-18 12:19:15 -0500

rnunziata gravatar image

updated 2017-10-18 12:35:06 -0500

The var have_calibration is always evaluating to false. I also tried this with just

ros::NodeHandle nh

and in place of that

ros::param::get

and

  ros::NodeHandle nh("~");
  // kill program, if we don't have a camera calibration
  bool have_calibration = true;
  have_calibration = have_calibration && nh.getParam("/Cam_fx", Cam_fx);
  have_calibration = have_calibration && nh.getParam("/Cam_fy", Cam_fy);
  have_calibration = have_calibration && nh.getParam("/Cam_cx", Cam_cx);
  have_calibration = have_calibration && nh.getParam("/Cam_cy", Cam_cy);
  have_calibration = have_calibration && nh.getParam("/Cam_s", Cam_s);

from parameter server:

PARAMETERS
 * /Cam_cx: 0.500156
 * /Cam_cy: 0.515833
 * /Cam_fx: 0.0.836562
 * /Cam_fy: 1.1233333
 * /Cam_s: 0.4

I loaded the parameters using: in launch file.

<rosparam command="load" file="$(find skimap_ros)/SkimapPtamFixParams.yaml"/>

There appears to be some kind of syntax or value error in the yaml file....but it is not reported . I will report back on the cause soon.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2017-10-18 13:11:58 -0500

rnunziata gravatar image

The value

/Cam_fx: 0.0.836562

is causing the parameter sever to become corrupt can someone please verify this.

edit flag offensive delete link more

Comments

perhaps it does not see it as numeric and that causes the test to fail...but there should have been an error msg some where..no?

rnunziata gravatar imagernunziata ( 2017-10-18 13:40:41 -0500 )edit

getParam doesn't display an error message. It indicates failure by returning false, allowing the user (you) to decide what to do. It seems you have answered your own question, so please select this answer as correct by clicking the checkmark.

Ed Venator gravatar imageEd Venator ( 2017-11-05 17:15:18 -0500 )edit
0

answered 2017-10-18 13:10:53 -0500

BhanuKiran.Chaluvadi gravatar image

I guess u r name space might not be matching. Try: rosparam list

u will be able to see complete namespace where your ros parameters lie.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2017-10-18 12:19:15 -0500

Seen: 433 times

Last updated: Oct 18 '17