ROS Actions part 2 Quiz: Drone won't take off

Greetings,

I realized my drone won’t take off no matter what i do except by publishing the topics individually in either /cmd_vel and /drone/takeoff or /drone/land. However responses from the server are present to have succeeded or not. Trouble shooting it, feedback is published and goal is published. However either sending a published empty message or cmd_vel message is not working. As much as i’d like to post my code, i believe it is not allowed. Can i request assistance?

Resolved. Temporary solution: Put all the initializing parameters, such as node handle, publishers and subscribers in either Protected, Public or Private in a class and avoid declaring them in callbacks.

1 Like

Way to go @joshuasamuelpsiy!

I think what was happening was that your publisher was not yet ready as explained in the post below. By creating them earlier, you increase the chance of the publisher being ready before you publish.

https://get-help.robotigniteacademy.com/t/robot-not-stopping-or-moving-when-you-publish-to-cmd-vel-how-to-publish-once-only-one-message-into-a-topic/346/2