MIT-SPARK/pose_graph_tools

frame_id ROS parameter not read correctly

WouterJansen opened this issue · 2 comments

When using Kimera-VIO-ROS I was experiencing some issues getting the pose graph to plot correctly.

One of the issues I experienced was that the frame of the nodes and edges wasn't being set correctly. I think this is down to the way the ROS parameter for frame_id is being read in.

What worked for me was changing

assert(nh.getParam("frame_id", frame_id_));

to

  ros::param::get("~frame_id", frame_id_);

Some more info here:
http://wiki.ros.org/roscpp/Overview/Parameter%20Server#Accessing_Private_Parameters

yunzc commented

Had solved this issue by making node handle private ros::NodeHandle nh("~"); in #5

@WouterJansen feel free to reopen if #5 doesn't solve the issue