New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix the problem in ros: can't take off after reset #4426
base: main
Are you sure you want to change the base?
Conversation
According to the api doc reset: This resets the vehicle to its original starting state. Note that you must call enableApiControl and armDisarm again after the call to reset.
Fixes: About How Has This Been Tested? use rqt to publish takeoff srv and vel topic, see the change of the /{Vehicle_Name}/collision_state topic before and after colission. Screenshots (if appropriate): After takeoff, none of the two drone is in collision |
Hey @shuaikangma, thank you for submitting this PR! I tested it locally and it's working for me. However, it seems that your PR is failing the clang-format check. Please follow these steps to resolve this:
Thanks for helping us with these style changes! |
airsim_client_->reset(); | ||
|
||
response.success = true; | ||
if(airsim_client_!=nullptr){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason to have this check? This is created in in the constructor itself, and the ROS service would have failed much earlier if it's null
from airsim_ros_pkgs.srv import TakeoffRequest,Takeoff | ||
|
||
msg = """ | ||
Control the RoboMaster TT (Tello Talent) through Gamepad |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this latest commit intentional? We're not sure if we want to merge gamepad support for a specific drone. If this script is only relevant to this one drone (Tello Talent), please move this latest commit to a new branch/PR. We'd still like to take the more general reset fix by itself, however.
Fixes: #4424
can't take off after reset in ros
About
#4424
I test reset service manually use rqt in ros, it can't take off after reset service being called. I see a commit and merge in the early version, but it may dose't work?
How Has This Been Tested?
According to the api doc:
reset: This resets the vehicle to its original starting state. Note that you must call enableApiControl and armDisarm again after the call to reset.
AIrSim version: #4410
Unreal version: v1.7.0-linux
OS version: ubuntu18.04 with ros-melodic
Use default settiongs :AirSim/ros/settings/front_stereo_and_center_mono.json in #4410
Screenshots (if appropriate):