AirSim
AirSim copied to clipboard
Fix the problem in ros: can't take off after reset
Fixes: #4424
can't take off after reset in ros
About
https://github.com/microsoft/AirSim/issues/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: https://github.com/microsoft/AirSim/pull/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 https://github.com/microsoft/AirSim/pull/4410
Screenshots (if appropriate):
Fixes: ####Add collision state publish in ros, now you can see a topic named /{Vehicle_Name}/collision_state(std_msgs::Bool) to show current collision state of the vehicle named {Vehicle_Name}. False---no cllision; True---collision
About #4424
How Has This Been Tested? AIrSim version: https://github.com/microsoft/AirSim/pull/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 https://github.com/microsoft/AirSim/pull/4410
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
Drone1 is in collision, Drone2 is not
Both of them are 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:
- check out your pull request
- run
git checkout master .clang-format
in your repo's root folder - if you don't have npm installed, download it from https://www.npmjs.com/get-npm
- run
npm install -g clang-format
- run
clang-format -i path/to/file
for each failing file (failing files can be found in the details for the clang-format check) - run
git add -u
to track all style changes - run
git commit -am "apply style from clang-format"
- run
git merge master
- resolve other non-style conflicts if you have any
- push changes
Thanks for helping us with these style changes!