ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

how to run global planner and main functions?

asked 2020-11-12 14:15:10 -0600

Eman.m gravatar image

Hello I am following this tutorial to integrate my custom planner: http://wiki.ros.org/navigation/Tutori...

But, why there is no main() function as used in some ROS examples? which involves calling init and advertise as in this tutorial:

http://wiki.ros.org/ROS/Tutorials/Wri...

appreciate your help

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-11-12 14:24:20 -0600

fergs gravatar image

updated 2020-11-12 14:24:59 -0600

There is no main in these cases because they are plugins (loaded by the pluginlib package), which are loaded by the move_base node (which has a main()). The move_base node then uses the C++ API of the planners.

edit flag offensive delete link more

Comments

To add to it, if you wanted to create a server from a plugin, you could instantiate it and create some publishers / subscribers to feed into from it (with a main).

stevemacenski gravatar image stevemacenski  ( 2020-11-12 20:16:47 -0600 )edit

I need a main() to randomly generate a start, goal, and store them in text file, and randomly generate obstacles and store them in the same text file as 2d arrray of 0s and 100s, then send this to makePlan

so, do I need to write a publisher node, and its main will publish to move_base node?

Eman.m gravatar image Eman.m  ( 2020-11-13 03:36:27 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2020-11-12 14:15:10 -0600

Seen: 135 times

Last updated: Nov 12 '20