RAFALAMAO / hector-quadrotor-noetic

Hector Quadrotor ported to ROS Noetic with Gazebo 11
61 stars 36 forks source link

How to restart motor after flipping over #9

Closed zzzzzyh111 closed 1 year ago

zzzzzyh111 commented 1 year ago

Hi, I am doing a reinforcement-leaning-based obstacle avoidance simulation with your quadrotor model. But I encountered a problem once the UAV flippered over due to impact, the motor just shut down. I tried to reset the position of the UAV and set a Z linear velocity to the UAV. But the UAV still kept still. This problem can only be solved by relaunching the file and rerunning the program. Can I ask if is there any programming-based method to solve this issue?

Thanks in advance!

zzzzzyh111 commented 1 year ago

Related information is shown in the below image WechatIMG6687

RAFALAMAO commented 1 year ago

This is a default action when drone flips over you need to relaunch, so if you want to modify it, you need to search it in code and rebuild de ros package.

I would recommend you to use Airsim, because it's more advanced.

Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: zzzzzyh111 @.> Sent: Thursday, October 20, 2022 2:42:17 AM To: RAFALAMAO/hector-quadrotor-noetic @.> Cc: Subscribed @.***> Subject: Re: [RAFALAMAO/hector-quadrotor-noetic] How to restart motor after flipping over (Issue #9)

Related information is shown in the below image [WechatIMG6687]https://user-images.githubusercontent.com/90167493/196886957-5902fc91-8e85-45b6-b60a-89688e87252a.jpeg

— Reply to this email directly, view it on GitHubhttps://github.com/RAFALAMAO/hector-quadrotor-noetic/issues/9#issuecomment-1285084783, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AUWWHMONSZILB2HNCXIZDPDWEDZVTANCNFSM6AAAAAARJ23SKU. You are receiving this because you are subscribed to this thread.Message ID: @.***>

zzzzzyh111 commented 1 year ago

Sorry for my late response, mate. I have figured out how to restart the motor after flipping over. Since the motor status is set to be False after flipping over, what we need to do is to modify it to be True, and everything works smoothly. Thanks for your advice anyway, and I wish you all the best!