dyn_goal - socrob/mbot_documentation GitHub Wiki

Dynamic Goal

Definition

Dynamic goal is introduced to enable the robot to follow a moving target pose through the transformation between 2 frames (a target and an origin frame). This can be used for people following using the person detected as target frame and the map as origin frame.

How can I use it?

Note: Make sure you check the config file to adjust the algorithm to your needs

To launch the node that does all the computation, after catkin building the dyn_goal package run:

roslaunch dyn_goal dyn_goal.launch

After this node is launched the robot will be ready to follow any Dynamic goal. This feature can be activated by publishing to the topic

\move_base_simple\dyn_goal

a message of the format dyn_goal_msg.msg like

rostopic pub --once /move_base_simple/dyn_goal dyn_goal/dyn_goal_msg "activated: true
dyn_goal_tf: 'tracked_person'
origin_tf: 'base_link'
dist: 1.2" 

You can personalize which tf you want to follow in relation to what tf and how far from it you want to be. If dist is set to 0.0 the robot will aim to be at that pose, so it can be used for a permanent moving goal.

To deactivate it simply publish to the same public a same kind of message with the parameter activated as false.

How it is used in People Following?

By launching the yolo people detector and bayes_people_tracker, you get an estimation of the pose of a person. This estimation is published as a topic and as a tf frame named tracked_person, and by using dyn_goal configured to follow this frame in relation to base_link at a certain distance, one gets the robot following a person with move base, until the dynamic goal is disabled.