Pixhawk as standalone GPS/IMU logger?

Can the Pixhawk be used as a standalone logger (i.e. no motors attached) for GPS/compass/attitude info?

I would like to temporarily add to a quad that already has a functional NAZA M V2 controller, but no way to log GPS positions. I need logs for a photogrammetry survey.

Thanks.  (Apologies for cross-posting on Ardupilot Pixhawk forum)

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Thanks for all of the input James.  Sounds like there are multiple options to get around this. 

    I managed to do this in the field by manually setting the mode to "Auto" and then Arming in APM Planner (I'm using a mac laptop) for each flight.  It worked well as a temporary hack - not sure if this is a bug I am exploiting as a "feature."  I only forgot to do this for one flight, and it looks like I can reconstruct the GPS track using the tlog.  I have to run Mission Planner in a W7 VM to get access to the tlog though, which is kind of annoying.

    The camera triggering worked very well, but I still need to tweak some of the settings (shutter duration, IR trigger servo limits) for my NEX-5 setup.  There were times when the first trigger started recording a movie rather than photos.  I also missed some shots b/c the distance interval was 5 m with shutter duration of 0.5 s, and variable velocity, often exceeding >5-10 m/s.  The PX4 seems to have triggered correctly, but the camera wasn't yet ready to acquire another image.

    Of course, the real solution to all this is to use the PX4 as the primary flight controller for the quad, and provide a real RC throttle input.

  • Thanks for your replies.  I've made some progress, and it's forcing me to learn the PX4 and APM Planner.  At this point, I have an IR-triggered NEX-5 shooting at a fixed distance interval with GPS/ATT/CAMERA logging and telemetry. 

    The ArduPlane firmware worked well for logging, but didn't seem to have some of the necessary camera triggering parameters, so I had to switch to ArduCopter.  I'm now running into the issue mentioned by James involving the ~15 second auto-disarm without increased throttle input.  The camera continues triggering after the auto-disarm (thankfully), but the dataflash logging stops.  I see that the tlog files are large and seem to log everything, but I haven't figured out how to efficiently work with them in APM Planner.

    Is there a way to disable the auto-disarm functionality?  I see in the doc that there is an ArduCopter:THR_MIN parameter - would setting this to 0 work?  I don't have the PX4 with me at the moment, so can't troubleshoot and we're heading out into the field tomorrow.  Any quick fix ideas?

    • Hi David,

      Would you rather have Arducopter log always (like Arduplane) or not automatically disarm? Both can be achieved with pretty minor code alterations. 

      In the mean time, I'm not sure if setting THR_MIN to zero will achieve what you want - do you have a receiver attached to the Pixhawk? How do you arm it currently prior to a mission? If you can set THR_MIN below the value that the PixHawk is seeing on the throttle channel then this may work, however it will then be difficult to arm with a Tx (if that is how you do it?!) you may be able to do this while the Pixhawk is atached to MP using the ARM command then disconnecting to conduct your mission. 

      I am sorry I am not more helpful right now - I am still a few hours away from getting to the office where I could test this out...

      • David, 

        THR_MIN will not achieve what you want - it sets the minimum level output by the Pixhawk to keep the motors spinning. The Pixhawk is looking at the RC input for activity on the throttle channel to stay armed.

        I ran a few tests and did manage to get the stock standard 3.1.2 copter logging without any changes to the code or a receiver attached. To do this I started with the Pixhawk attached to MP and disabled all failsafe settings. I armed the Pixhawk using the MP 'Arm' command and then ran a simple Python script to raise the throttle channel: Script.SendRC(3,1200,True). After this was run, the Pixhawk was happy to stay armed and logging even after disconnecting from MP.

        If you want to fix this problem by altering the code:

        To disable auto disarm, comment out the following line:
        https://github.com/diydrones/ardupilot/blob/ArduCopter-3.1.2/ArduCo...

        To enable permanent logging, add the following line at the end of init_ardupilot() in system.pde:
        start_logging();
        (add here: https://github.com/diydrones/ardupilot/blob/ArduCopter-3.1.2/ArduCo...)

        Hope this helps.

  • Yes, I do this as part of monitoring the performance of our kites. I had to modify the code to log all the time rather than when 'armed'(as well as monitor other external sensors). I use copter because that is what I am familiar with but I think plane might not need this mod order to log always...
  • 3D Robotics

    Yes, it can. Just attach with its GPS unit. If you add the telemetry module, you can get real-time data, or just use the onboard datalogging for download on landing. 

This reply was deleted.

Activity