Skip to content
This repository has been archived by the owner on Aug 5, 2024. It is now read-only.

Error Using ArduPilotPlugin With URDF Models #26

Open
blakermchale opened this issue Mar 3, 2020 · 11 comments
Open

Error Using ArduPilotPlugin With URDF Models #26

blakermchale opened this issue Mar 3, 2020 · 11 comments

Comments

@blakermchale
Copy link

blakermchale commented Mar 3, 2020

I am currently working on getting the ardupilot plugin to work with multiple UAVs that are launched via URDF files. I was able to transition the SDF models to URDFs that spawn correctly and output all of the expected topics (imu topic, camera topic). The models make a connection with the ardupilot side and all of the SITL consoles launch appropriately without error. However, I cannot successfully get the UAV to arm and then takeoff. With the SDF models it works.
One difference I see between the two cases, SDF and URDF, is that in the console for URDF ardupilot this error is constantly output "APM: PreArm: Accels inconsistent".
Another difference is that when I send an "arm throttle" it shows "Got MAVLink msg: COMMAND_ACK {command : 400, result : 4}" instead of "Got MAVLink msg: COMMAND_ACK {command : 400, result : 0}".
Any tips or examples on how to resolve this issue and get the URDF models to fly appropriately?

@edmuthiah
Copy link

edmuthiah commented Jun 6, 2020

@blakermchale
Hi Blake, I have an identical issue with the iris drone. Converted SDF to URDF and got a connection with ArduPilot but no response to takeoff messages in Gazebo. Did you manage to figure this out?
image

@blakermchale
Copy link
Author

Hey Ed, I did not end up finding a solution to getting a good connection with the URDF file. I read through your issue on SwiftGust repo above. I ended up just using the SDF file directly like SwiftGust mentions. I tried to debug the issue myself and found that it seems to be an issue with the gazebo ros factory spawn service. I passed both an SDF and URDF to this spawning method and both had the same error as before.

@linuxsocke
Copy link

I converted the sdf to a urdf file and spawned the model within gazebo-ros. So it should work.

@edmuthiah
Copy link

@linuxsocke could you share the code if it does work? I got pretty close but couldn't get the RViz setup correctly.

@linuxsocke
Copy link

linuxsocke commented Aug 5, 2020

@ed-muthiah So what I did is taking the urdf examples from the rotors_simulator and adopted the plugins required for ardupilot. So I only had an issue when adding the imu but the tutorial helped me out.

As I told. Using urdf I can load in my mav and with mavproxy I can arm and takeoff.

@edmuthiah
Copy link

edmuthiah commented Aug 5, 2020

@linuxsocke

  1. Are you using the Iris drone?
  2. Do you get an RViz visualisation too?
  3. Have you tested with other mavproxy commands other than arm and takeoff? Does you drone continue to drift upwards?
  4. Could you please submit a code to this repo if you are willing :)

Thanks.

@linuxsocke
Copy link

I just took the urdf files from the rotors_simulator and substituted the imu and ardupilot plugin. Codewise it should work straight forward. I did not tested it yet on rviz.

@linuxsocke
Copy link

@ed-muthiah Maybe I can later show working code. But right now its quite a lot and I want to shorten it a bit first.

@edmuthiah
Copy link

@linuxsocke @blakermchale This should work but no RViz visualisation because that requires setting up a world and odom frame. Would be cool if you guys can help with this.

image

rename the extension to be .urdf
eddy.txt

@standmit
Copy link

I had a similar problem. This solution helped me: SwiftGust#23 (comment)

@yangzhaotong1996
Copy link

@edmuthiah hello sir can you share your launch file about ArduPilotPlugin With URDF Models

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants