Developer

APMrover2 2.41 released

I've just released APMrover2 2.41.

This release fixes a number of bugs in 2.40, plus adds some new features for dual sonar setups. Many thanks to Tom, Greg and Linus for some great suggestions and assistance with this release!

The main changes in this release are:

  • switched to new dataflash logging format to improve quality of logs and allow for new log messages without upgrading mission planner
  • added SD card logging support on PX4
  • fixed compass handling in HIL simulation
  • added new INITIAL_MODE option
  • changed AUTO_TRIGGER_PIN to be push-on/push-off, so you can run a rover with no transmitter (for Sparkfun competition)
  • added SONAR_STOP_PIN and SONAR_SETTLE_TIME options for analog sonars, to allow dual sonar setups with no interference

The most significant changes are for the dual sonar handling. The previous release introduced dual sonar support, but in practices we found that the two sonars would often interfere with each other. Each sonar puts out 40kHz pulses, and if the other sonar receives that pulse then it will register a false obstacle.

The fix is to take advantage of the trigger pins on some sonars (such as MaxBotix sonars). You can set the SONAR_STOP_PIN and SONAR2_STOP_PIN parameters to pins on the APM that will be used to trigger the sonars. You then set the SONAR_SETTLE_TIME for each sonar to the time it will take for the pulse to go out and come back (around 50ms is good for 7m sonars). This ensures that only one sonar is measuring distance at a time, which gives much better results.

Happy driving!

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

Join diydrones

Email me when people reply –

Replies

  • Hello sir I was wondering if you can add Crius AIO v02 board  on your program to work for the ardutover vehicle. this a cheaper option/

    for me.

  • Hi Andrew,

    How about the PX4 with the the two SONARs.

    I figured Miso and Mosi pins on PX4IO's SPI port could provide the 2 necessary analog inputs.

    Possibly somebody (- hint! - hint!) could map them to the available parameter pin assignments so that they could be used to connect to SONAR1_PIN and SONAR2_PIN.

    Or if that's already possible, maybe you could mention which 2 pins.

    Thank You,

    Gary

  • The MaxBotix sensors can be chained allowing you to use multiple devices at once without interference, the only thing you need to do is trigger them once during startup, rather than adding enable pins for each sensor why not add a single sensor start pin to make use of this feature?

  • Admin
    Hi All,
    I started out just running a small preset waypoint course with 8 waypoints and no sonar. Each run got better as the GPS accuracy improved.
     
    Then I set the learning mode and recorded an 8 waypoint course still without active sonar. As before each run got better as the GPS accuracy improved. So far so good.
     
    I then turned the sonar on and ran the recorded waypoint course successfully. There seemed to be minimal false targets as the rover ran pretty straight over the course.
     
    On the final run I decided to put an 2 ft wide object infront of the rover as it started the wapoint course. Well, it did not avoid the object and ran straight into it. Oh boy. What is wrong?
     
    So I went inside, setup the learning mode, and set the trigger distance to 100cm as the nearest target that both sonars can see is ~135cm.
     
    While in the steering mode I placed a target infront of the left sonar and guess what, the steering turned left right into the target. I then tried the same thing with the right sonar and the rover made a right turn into the target.
     
    So I went back to the steering angle parameter and changed it to a -25 instead of the +25 I had it set to originally. Well that cured the problem. Simple fixes are always the best.
     
    Now when I place a target infront of the left sonar, the steering turns right like it should and when a target is placed infront of the right sensor, the steering turns left as it should.
     
    So, I think that Tridge needs to change the obstacle avoidance steering code such that a positive steering angle will result in the rover turning left when it sees a target on the right and turning right when it sees a target on the left. For testing purposes I will keep the steering turning angle at the negative value to be able to continue testing.
     
    Comments?
     
    Regards,
    Tom C
  • Just loaded it.  Look forward to trying it out tomorrow.  John

  • 3D Robotics

    Yay! Thanks, Tridge. Just in time for AVC. 

This reply was deleted.