This experimental package uses actionlib to implement a simple navigation server and client for hector quadrotor.
Server publishes /cmd_vel
topic to control quadcopter movement and /goal_marker
topic to indicate current goal in RVIZ (for debugging purposes).
The goal is set by navigation client.
Client subscribes to the /get_goal
topic. New waypoint for a quadcopter to fly to can be specified for example by:
rostopic pub -1 /get_goal geometry_msgs/Point "x: -4.0
y: -4.0
z: 1.0"
This will trigger goalCallback
function of the client which sends a move_quadcopter::NavigateGoal
request to the server together with XYZ coordinates of the waypoint.
- install
move_quadcopter
package in your catkin workspace and compile it (catkin_make --pkg move_quadcopter
) - launch the test launchfile:
roslaunch move_quadcopter indoor_test_hector_quadcopter.launch
- take off (either by publishing to messages to
/cmd_vel
topic or by using joystick - see the comment inindoor_test_hector_quadcopter.launch
) - publish
geometry_msgs/Point
on/get_goal
topic
The quadcopter should start to move towards the goal marker (visible as small green sphere in RVIZ). It should first adjust its altitude then rotate to face the target and start to moving towards it.
- navigation action is considered successfull by the server if the distance from the goal is less than 0.1 (see
NavigationServer::executeNavigate
)