(sbpl_lattice_planner) Cannot use ros::Time::now() before the first NodeHandle has been created [closed]

asked 2012-07-19 08:11:04 -0500

jyjun2119 gravatar image

updated 2012-07-24 07:05:27 -0500

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.

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2015-03-26 18:27:24.522654

Comments

3

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.

Eric Perko gravatar image Eric Perko  ( 2012-07-19 09:12:03 -0500 )edit

I second @Eric Perko's comment. I recently compiled and ran sbpl_lattice_planner in both Electric and Fuerte.

piyushk gravatar image piyushk  ( 2012-07-25 16:06:11 -0500 )edit

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 gravatar image jyjun2119  ( 2012-07-30 02:41:26 -0500 )edit

@jyjun2119: I'm afraid I ran it with a custom script on a real robot. I cannot comment about that launch script.

piyushk gravatar image piyushk  ( 2012-08-01 19:20:38 -0500 )edit