Coordinate frames do not move when using ArduCopter with ROS #3590
Replies: 4 comments 7 replies
-
|
I would say its a bit of intended behaviour. The AirSim-ArduPilot integration doesn't have state info flowing from AP to Airsim, which is supposed to be used for the movement APIs. It would be possible to add code so that the sensor data being sent by Airsim is also used for the state info APIs used by AirSim, however the data should be what the flight controller/firmware thinks the values are, which can be different from the simulated data. Therefore, the AP integration just returns NaN for most of the APIs, see ArduCopterApi.hpp Instead, for controlling the vehicle and gathering such information, you can use Hope this helps! |
Beta Was this translation helpful? Give feedback.
-
|
Thank you @rajat2004! Is it also intended behavior that some camera frames are moving using AirSim ROS with ArduCopter while other frames do not move? Are these camera poses reliable given your described case that a flight controller/ firmware may assume different data? Thank you again and best regards! |
Beta Was this translation helpful? Give feedback.
-
|
Hi, sorry for the late reply. I myself haven't tested this, so I feel it would be wrong to arrive at a conclusion without some testing. For checking the divergence between the estimated and Airsim's position data, the GPS sensor API could be used. If you want, I could add some code to implement the data gathering APIs if it makes things simpler for testing. |
Beta Was this translation helpful? Give feedback.
-
|
Hello, I am also having this problem. I'm trying to use AirSim to simulate an existing drone system based on Ardupilot and ROS. We have several nodes for mission management, trajectory generation etc. and the drone is controlled using Mavros. My understanding was that AirSim with Ardupilot SITL can be used as a drop-in replacement of the physical drone hardware and flight controller, Mavros can be configured to communicate with SITL and the rest of the system can seamlessly interact with the simulated drone. I'm also running the I don't understand why the Ardupilot and AirSim positons aren't identical. Based on what @rajat2004 said it seems that the positions from Ardupilot are not being fed back into AirSim, but honestly that doesn't make sense to me. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Bug report
What's the issue you encountered?
I could not find anything about it, so I am not sure if this is a kind of intended behavior or a bug.
Using AirSim together with ROS works perfectly fine for me if SimpleFlight is set as
VehicleTypein the settings.json (Multirotor SimMode): Coordinate frames move as expected in rviz when flying around and sensor and image data is published on topics.However, frames do not move as I would expect if ArduCopter as
VehicleTypeis used. Then most of the frames, including the odom_local_ned frame, are located within the world frame (0, 0, 0) or in the location that was defined in thesettings.json. Only some of the camera frames move.Note: The AirSim ROS node was built from source, for the simulation itself one of the binaries is used.
Settings
Minimal settings:
How can the issue be reproduced?
Thank you for your great work! Maybe you can help or have an idea here. Thank you!
Beta Was this translation helpful? Give feedback.
All reactions