OpenCV Exercise 2-5: Drone is stopped. How to move it?

Looking at the solution of it, looks like exercise 2-5 wants the Drone to move around, but on the 3D sim it is stopped, and a camera image from the drone is looking to always the same direction.

How can I move the drone around?

I guess b/c there are some course' prerequisite, incl. ROS Basic, I skimmed through it. From there I found the following from Drone's section (I haven't tried anything further out of these yet though):
rosrun teleop_twist_keyboard teleop_twist_keyboard.py
rostopic pub /drone/land std_msgs/Empty "{}"
rostopic list
rosservice list
$ rosnode info /flying_drone
--------------------------------------------------------------------------------
Node [/flying_drone]
Publications:
 * /cmd_vel [geometry_msgs/Twist]
 * /rosout [rosgraph_msgs/Log]

Subscriptions:
 * /clock [rosgraph_msgs/Clock]
 * /sonar_height [sensor_msgs/Range]

Services:
 * /flying_drone/get_loggers
 * /flying_drone/set_logger_level

contacting node http://1_simulation:36765/ ...
Pid: 321
Connections:
 * topic: /rosout
    * to: /rosout
    * direction: outbound (46363 - 172.20.0.6:56264) [9]
    * transport: TCPROS
 * topic: /cmd_vel
    * to: /gazebo
    * direction: outbound (46363 - 172.20.0.6:56542) [12]
    * transport: TCPROS
 * topic: /clock
    * to: /gazebo (http://1_simulation:38037/)
    * direction: inbound
    * transport: TCPROS
 * topic: /sonar_height
    * to: /gazebo (http://1_simulation:38037/)
    * direction: inbound
    * transport: TCPROS

Hi @iisaac.saito ,

Welcome to this Community!

  1. Are you able to takeoff and land the drone?
  2. Are you taking off the drone before moving?
  3. Using teleop to move the drone when the drone is landed will not move the drone.

To take off you must publish an Empty message to /drone/takeoff.
Similarly, for landing, you must publish Empty message to /drone/land.

Try these out and let us know if it worked or not.

Regards,
Girish

I figured it out. Teleop lets me move the drone, without knowing the name of topic being used.

rosrun teleop_twist_keyboard teleop_twist_keyboard.py

Whoever writes this tutorial, why not include the drone operation in the OpenCV tutorial? People like me who haven’t done any other tutorials might have no idea how to move a drone in this particular tutorial.

  1. Are you able to takeoff and land the drone?
    […]

I was specifically asking about the exercize 2-5, where a drone is already launched and flying.

  1. Using teleop to move the drone when the drone is landed will not move the drone.

I haven’t fully looked into though, but there seems to be a command running that tries to keep the drone at a certain height. So by sending teleop command, drone executes the command, but soon it goes back to the pre-set height.