ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Hello, sounds a funny idea.
You can use the app_manager to start/stop/lists apps in the robot. Assuming you launched turtlebot_bringup minimal.launch, you can list the available apps with:
rosservice call /turtlebot/list_apps | grep -v data
(the grep is to avoid get spammed with icons binary data)
To start/stop follower:
rosservice call /turtlebot/start_app "name: 'turtlebot_core_apps/follower'"
rosservice call /turtlebot/stop_app "name: 'turtlebot_core_apps/follower'"
Note that start the app takes some time, as it launches opennni driver and some other stuff. Once started, following behavior can be activated/deactivated with:
rosservice call /turtlebot_follower/change_state "state: 1"
rosservice call /turtlebot_follower/change_state "state: 0"
This is much faster and less error prone that start/stop the app. Btw, you can also call services with the service client API.