Great lesson! But a few questions remained:
1- Could anybody explain the code below:
takeoff = rospy.Publisher('/drone/takeoff', Empty, queue_size=1) #Create a Publisher to takeoff the drone
takeoff_msg = Empty() #Create the message to takeoff the drone
takeoff.publish(takeoff_msg)
Or, more specifically, how would I know that the object “takeoff” would need a message Empty() as argument? (OK, just solved that myself: “rostopic info /drone/takeoff” gives you that!)
I may have missed something before, but I wouldn’t think about creating an object publisher, with takeoff and landing, I was trying to publish directly on cmd_vel (without much success). How can I get to know these things, without the help of the experts?
Thank you in advance,