geturin / OAFD_Monocular

Master Thesis
MIT License
48 stars 7 forks source link

Tello_node.py manual control with apps #12

Closed DigitalDungeon01 closed 5 months ago

DigitalDungeon01 commented 5 months ago

i try to connect the Tello_node,py

the problem is when i use TELLO EDU apps or Tello apps , i connect to my dji then at the same time i already connected to ROS, then i hit take off on APPS ,then it take off, but when i run the tello-node.ph script which i use rosrun, the script cant connect to my drone, it failed. Is there any suggestion in term of apps like the same apps that you use? Or any alternative to fix my problem like any other script?

my plan is to record the rosbag at the same time i control using apps

DigitalDungeon01 commented 5 months ago

also for the multiple waypoint flying by publish a waypoint to ego planner package, do you think its possible ?

i saw the issue from the internet :

https://github.com/ZJU-FAST-Lab/ego-planner-swarm/issues/3#issuecomment-808662242

geturin commented 5 months ago

You can first connect Tello to ROS, and then connect the app. At this point, the phone won't receive the video stream but can still send control information to Tello. This is how I recorded some experimental rosbags.

ego_planner does allow you to preset a series of waypoints; you can modify ego_tello.launch. However, due to the scale uncertainty between the monocular SLAM coordinate system and the real-world coordinate system, directly setting waypoints might not work.

DigitalDungeon01 commented 5 months ago

the problem solved. thank you so much for your help sir!!!. you're really my HERO!.

geturin commented 5 months ago

Monocular SLAM cannot obtain the camera's movement distance in the real world; everything is based on an 'estimated value' initialized by monocular SLAM. Therefore, every time you start a new SLAM session, the SLAM coordinate system may be either too large or too small relative to the real world.

To avoid the coordinate system being too small, I added a resiz_scale in the orb_slam3_ros_wrapper. You can check it here: https://github.com/geturin/orb_slam3_ros_wrapper/commit/4f1aaffa1c4eae9ad9680047bd867650f673989e.

To prevent the changing coordinate system scale from disturbing the PID control each time, I estimate an approximate scale using the TOF sensor data and the current SLAM coordinate system height after each takeoff and incorporate it into the PID control. https://github.com/geturin/OAFD_Monocular/blob/41f98f3fb53c3250187efc55c2893373dc32cfbc/src/planner_ctrl.py#L89 ※The resiz_scale in orb_slam3_ros_wrapper was also intended to be estimated in the same way, but I didn't complete

So, if you want to publish a series of precise waypoints and have Tello fly to them sequentially, I think you need to find a way to accurately calculate the scale between the SLAM coordinate system and the real-world coordinate system.

DigitalDungeon01 commented 5 months ago

I truly appreciate your outstanding work, sir. It's truly spectacular. Thank you so much for your invaluable assistance to the ROS community, especially for a beginner like me.

iam going to try to do some modifation on the waypoints. if i got a good news, iam going to inform you back