ROS Basics in 5 days (python) Final Exam Drone Challenge

Hope you’re doing great
I have problem in the final exam Drone Challenge
Same code as below

#!/usr/bin/env python

import rospy
from std_msgs.msg import Empty

rospy.init_node(‘drone_takeoff_node’, anonymous=True)
pub = rospy.Publisher(‘/takeoff’, Empty, queue_size=1)
rospy.loginfo(“Publishing Ready…”)

rospy.loginfo(“Taking Off…”)
pub_msg = Empty()


one time the autocorrecter bot check it as correct other time as wrong
what should i do ??

Big Thanks in advance

Abdel Raouf DANNAOUI

It looks like your drone is not taking off consistently, perhaps because your messages are getting lost. Instead of using rospy.sleep(5), see:

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.