Open blakermchale opened 4 years ago
@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?
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.
I converted the sdf to a urdf file and spawned the model within gazebo-ros. So it should work.
@linuxsocke could you share the code if it does work? I got pretty close but couldn't get the RViz setup correctly.
@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.
@linuxsocke
Thanks.
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.
@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.
@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.
rename the extension to be .urdf eddy.txt
I had a similar problem. This solution helped me: https://github.com/SwiftGust/ardupilot_gazebo/issues/23#issuecomment-897408364
@edmuthiah hello sir can you share your launch file about ArduPilotPlugin With URDF Models
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?