AirSim icon indicating copy to clipboard operation
AirSim copied to clipboard

Fix the problem in ros: can't take off after reset

Open shuaikangma opened this issue 2 years ago • 3 comments

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):

Screenshot from 2022-03-21 21-31-26

shuaikangma avatar Mar 21 '22 13:03 shuaikangma

CLA assistant check
All CLA requirements met.

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 Screenshot from 2022-03-22 23-06-09

Drone1 is in collision, Drone2 is not Screenshot from 2022-03-22 23-06-42

Both of them are in collision Screenshot from 2022-03-22 23-07-13

shuaikangma avatar Mar 22 '22 15:03 shuaikangma

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:

  1. check out your pull request
  2. run git checkout master .clang-format in your repo's root folder
  3. if you don't have npm installed, download it from https://www.npmjs.com/get-npm
  4. run npm install -g clang-format
  5. run clang-format -i path/to/file for each failing file (failing files can be found in the details for the clang-format check)
  6. run git add -u to track all style changes
  7. run git commit -am "apply style from clang-format"
  8. run git merge master
  9. resolve other non-style conflicts if you have any
  10. push changes

Thanks for helping us with these style changes!

zimmy87 avatar Mar 23 '22 16:03 zimmy87