(sbpl_lattice_planner) Cannot use ros::Time::now() before the first NodeHandle has been created [closed]
Hello,
I am following the <link href="http://www.ros.org/wiki/sbpl_lattice_planner"> sbpl_lattice_planner example </link> and when I do,
roslaunch sbpl_lattice_planner move_base_sbpl_fake_localization_2.5cm.launch
I get the following error message
terminate called after throwing an instance of 'ros::TimeNotInitializedException' what(): Cannot use ros::Time::now() before the first NodeHandle has been created or ros::start() has been called. If this is a standalone app or test that just uses ros::Time and does not communicate over ROS, you may also call ros::Time::init() [nav_view-6] process has died [pid 4647, exit code -6].
Basic system info:
OS: Ubuntu 11.04 64bit
ROS Distribution: Diamondback
I would appreciate if someone could help me out with this problem.
[Answer to Eric's comments: Below]
Thanks Eric for your comments. But I have some more issues now.
Case 1: ROS Fuerte with Ubuntu 12.04
I tried the following:
First, I "rosmade" (with 'rosmake' of course) both 'sbpl_lattice_planner' and 'sbpl' packages.
Then, I modified the following line from a .xml file
< node name="nav_view" pkg="nav_view" type="nav_view" respawn="false" >
to
< node name="rviz" pkg="rviz" type="rviz" respawn="false" >
The error message that I originally got is gone (because I am using rviz instead of nav_view), but then I get the following error message:
[stageros-5] process has died [pid 21723, exit code -11
I tried to search the meaning of this exit code (-11) from the source file (stageros.cpp), but the only two exit values that I could find were 0 and -1.
stageros node is launched from the "move_base_sbpl_fake_localization_2.5cm.launch" file (a launch file that came with the sbpl_lattice_planner" package). Please see the following:
< node pkg="stage" type="stageros" name="stageros" args="$(find sbpl_lattice_planner)/worlds/willow.world" respawn="false" >
< param name="base_watchdog_timeout" value="0.2" />
< /node >
Of course I have the willow.world file in the right path.
Case 2: ROS Diamondback with Ubuntu 11.04
I tried the exact same steps as on ROS Fuerte (that is using rviz instead of nav_view), then I don't have any problem with the stageros. But, the robot doesn't move, and when I echo the /cmd_vel topic I get the following WARNING message:
WARNING: no messages received and simulated time is active. Is /clock being published?
But when I echo the /clock topic, I see that the /clock topic is being published.
Request
Any help for both cases or any of them will be appreciated.
Could you try this on a newer version of ROS e.g. Electric or Fuerte? nav_view (which is what appears to be throwing the error) was deprecated and is no longer supported in favor of rviz.
I second @Eric Perko's comment. I recently compiled and ran sbpl_lattice_planner in both Electric and Fuerte.
piyushk, I can compile sbpl_lattice_planner just fine from both Electric and Fuerte, but I still CAN'T run it satisfactorily. Could you tell me if you run it just typing 'roslaunch sbpl_lattice_planner move_base_sbpl_fake_localization_2.5cm.launch' or you modified something? If modified, what?
@jyjun2119: I'm afraid I ran it with a custom script on a real robot. I cannot comment about that launch script.