Ivan, You need to use something like nh_private = getMTPrivateNodeHandle(); .. and this should be in void onInit(). hth, Pat On Tue, Jan 25, 2011 at 1:56 PM, Ivan Dryanovski wrote: > Hi all, > > I am having some trouble with getting parameters from a launch file. > The same bit of code worked well with a node driver, but when i > switched to a nodelet driver, it fails. I am running on Ubuntu 10.10, > ros unstable. > > Here are some more details: > > I have the following bit of code running to get a parameter: > >    ros::NodeHandle nh_private ("~"); >    if (!nh_private.getParam ("enable_IMU_CALCDATA", enable_IMU_CALCDATA_)) >      enable_IMU_CALCDATA_ = false; > > When I run that code with a node driver, everything works fine. I use > the following launch file: > >   respawn="false" required="true" output="screen"> >     >   > > However, when I run the code with a nodelet driver, it fails to check > the param, and assumes the default (false) value. This is the launch > file for the nodelet: > >   args="manager" output="screen" /> >   args="load asctec_autopilot/AutoPilotNodelet pelican_manager" > output="screen"> >     >   > > Any help would be appreciated! > > Thanks, > Ivan Dryanovski > _______________________________________________ > ros-users mailing list > ros-users@code.ros.org > https://code.ros.org/mailman/listinfo/ros-users >