remove use of deprecated ~ in parameter names

This commit is contained in:
meeussen 2009-10-08 20:08:28 +00:00
parent 15d19bb1fb
commit 5c2096f0de
2 changed files with 4 additions and 3 deletions

View File

@ -64,7 +64,6 @@ public:
bool publishTransforms(const std::map<std::string, double>& joint_positions, const ros::Time& time); bool publishTransforms(const std::map<std::string, double>& joint_positions, const ros::Time& time);
private: private:
ros::NodeHandle n_;
ros::Publisher tf_publisher_; ros::Publisher tf_publisher_;
KDL::Tree tree_; KDL::Tree tree_;
boost::scoped_ptr<KDL::TreeFkSolverPosFull_recursive> solver_; boost::scoped_ptr<KDL::TreeFkSolverPosFull_recursive> solver_;

View File

@ -50,13 +50,15 @@ RobotStatePublisher::RobotStatePublisher(const Tree& tree)
:tree_(tree) :tree_(tree)
{ {
// get tf prefix // get tf prefix
n_.param("~tf_prefix", tf_prefix_, string()); NodeHandle n_local("~");
n_local.param("tf_prefix", tf_prefix_, string());
// build tree solver // build tree solver
solver_.reset(new TreeFkSolverPosFull_recursive(tree_)); solver_.reset(new TreeFkSolverPosFull_recursive(tree_));
// advertise tf message // advertise tf message
tf_publisher_ = n_.advertise<tf::tfMessage>("/tf", 5); NodeHandle n;
tf_publisher_ = n.advertise<tf::tfMessage>("/tf", 5);
tf_msg_.transforms.resize(tree.getNrOfSegments()-1); tf_msg_.transforms.resize(tree.getNrOfSegments()-1);
// get the 'real' root segment of the tree, which is the first child of "root" // get the 'real' root segment of the tree, which is the first child of "root"