rst-tu-dortmund / teb_local_planner_tutorials

This package contains supplementary material and examples for teb_local_planner tutorials.
167 stars 96 forks source link

how to know if launch finished? #5

Closed shanpenghui closed 5 years ago

shanpenghui commented 5 years ago

I use the cmd "roslaunch teb_local_planner_tutorials robot_diff_drive_in_stage.launch" to launch the planner. Before i don't need to know when the launch is finished.Now i have to detect when the launch finished.But i dont know if ros have some related function or cmd(any suggestion?). My current thinking is to detect the message from launch,such as ROS_INFO"Loading map from image "/home/sph/catkin_ws/src/teb_local_planner_tutorials/maps/maze.png" after launch the .launch file., to jugg the launch is finished(I not sure the thinking is right?). But i still dont understand where it come from and why it show in terminal.Can give some suggestion or am I do error setting? The ROS_INFO list after "roslaunch teb_local_planner_tutorials robot_diff_drive_in_stage.launch" is : ` [ INFO] [1559179186.040359834]: Loading map from image "/home/sph/catkin_ws/src/teb_local_planner_tutorials/maps/maze.png" [ INFO] [1559179186.288335915]: Subscribed to map topic. [ INFO] [1559179186.689422877, 0.400000000]: Read a 200 X 200 map @ 0.050 m/cell [ INFO] [1559179186.895850372, 0.600000000]: Received a 200 X 200 map @ 0.050 m/pix

[ WARN] [1559179186.895892739, 0.600000000]: Frame_id of map received:'/map' doesn't match global_frame_id:'map'. This could cause issues with reading published topics [ INFO] [1559179186.907754576, 0.600000000]: Initializing likelihood field model; this can take some time on large maps... [ INFO] [1559179186.918357768, 0.600000000]: Done initializing likelihood field model. [ INFO] [1559179187.963063646, 1.700000000]: Using plugin "static_layer" [ INFO] [1559179187.975082141, 1.700000000]: Requesting the map... [ INFO] [1559179188.155809907, 1.900000000]: Resizing costmap to 200 X 200 at 0.050000 m/pix [ INFO] [1559179188.256951645, 2.000000000]: Received a 200 X 200 map at 0.050000 m/pix [ INFO] [1559179188.269821289, 2.000000000]: Using plugin "obstacle_layer" [ INFO] [1559179188.273856818, 2.000000000]: Subscribed to Topics: laser_scan_sensor [ INFO] [1559179188.321006716, 2.000000000]: Using plugin "inflation_layer" [ INFO] [1559179188.412425890, 2.100000000]: Using plugin "static_layer" [ INFO] [1559179188.419119554, 2.100000000]: Requesting the map... [ INFO] [1559179188.423186303, 2.100000000]: Resizing static layer to 200 X 200 at 0.050000 m/pix [ INFO] [1559179188.457461930, 2.200000000]: Received a 200 X 200 map at 0.050000 m/pix [ INFO] [1559179188.464019282, 2.200000000]: Using plugin "obstacle_layer" [ INFO] [1559179188.467258318, 2.200000000]: Subscribed to Topics: laser_scan_sensor [ INFO] [1559179188.540650205, 2.200000000]: Created local_planner teb_local_planner/TebLocalPlannerROS [ INFO] [1559179188.663688364, 2.400000000]: Footprint model 'point' loaded for trajectory optimization. [ INFO] [1559179188.663775597, 2.400000000]: Parallel planning in distinctive topologies enabled. [ INFO] [1559179188.663818864, 2.400000000]: No costmap conversion plugin specified. All occupied costmap cells are treaten as point obstacles. [ INFO] [1559179189.565810261, 3.300000000]: Recovery behavior will clear layer obstacles [ INFO] [1559179189.574691111, 3.300000000]: Recovery behavior will clear layer obstacles [ INFO] [1559179189.625343276, 3.300000000]: odom received! ` So , if i get the msg "odom received!", i can recognize the launch is finished.Is that right?

croesmann commented 5 years ago

Hi, this issue is more related to the ros launch system in which nodes are launched asynchronously. However, 'odom received' indeed indicates that the navigation stack is ready to be used.

I close this issue for now. If you have further questions, don't hesitate to continue answering.

shanpenghui commented 5 years ago

Can you just tell me where the message "odom received!" come from? I try to find it in source code but i failed.I need to use it as a mark to determine when the launch is finished.Thanks very much for help.

croesmann commented 5 years ago

It comes from the move_base node.