- Ubuntu 16.04 LTS
- ros-kinetic-desktop-full
- turtlesim (installed by default)
This demo is mainly a target track founction, use default turtlesim pkg. first step is calling inner service of turtlesim node to spawn a new turtle named turtle2, so there is now two turtles in the playgrund. then subscrib the posetion of two turtle to calculate where and how long the turtle1 is located from turtle2. finally publish a turtle2/cmd_val include abouve info and loop again to have a realtime situation.
Usage:
- Start roscore first
- Start turtlesim node
- If you compile the pakage and add refresh your terminal source, you can find rosrun <your_pkg_name> service_spawn, enter
- As same, find rosrun <your_pkg_name> track_path, enter
- Use "rosrun turtlesim turtle_teleop_key" to move your turtle1 anywhere, have fun!
NOTICE: track_path while calculate only when two turtles are exist and alive.
It is only a learning demo at beginner level, over. 05-07-2020, Wenthday. Email:[email protected]