0
$\begingroup$

Rosanswers logo

Hello! To preface, I working with a turtlebot3 running ROS on Ubuntu, and working with the package frontier-exploration. I am designing a Python script that will send the turtlebot to its point of origin when the battery is low, and stop when it reaches that point. It operates by specifying a very small perimeter around the bot's point of origin. Now the problem: I want the bot to completely stop moving when it reaches its goal, but I cannot seem to publish a Twist to cmd_vel that will stop the bot. Is there a way that I can shutdown frontier-exploration from my Python script? Thank you!


Originally posted by AmateurHour on ROS Answers with karma: 95 on 2018-06-27

Post score: 0


Original comments

Comment by jayess on 2018-06-27:
Can you please update your question with what you've attempted so far (i.e., your code)?

Comment by Geoff on 2018-06-27:
You should post a new question about your inability to stop the robot using commands. Shutting down the node is a heavy-handed way to stop frontier-exploration and there should be a better way. (If there isn't, your question might trigger someone to produce one.)

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

You can manage nodes from a Python program using the roslaunch API. Keep in mind that this API is listed as "very unstable", although it has been in that state since forever and to be honest I don't think it will change that much from now on.

The rosmon tool might also interest you. It replaces roslaunch, and as well as several other useful features, it provides a ROS service that you can use to start and stop nodes.


Originally posted by Geoff with karma: 4203 on 2018-06-27

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.