Servers by jDrones

Problems With Obstacle Avoidance

(Chuck Lundy) #1

Can someone look over this log and tell me what the problem is? When I switch from manual to steering mode the wheels on my Traxxas Stampede, turn full in one direction until throttle is added, then it is still squirrely. The big issue is with the sonar obstacle avoidance. Whatever the turn direction is set for, either positive or negative angles, in steering mode, the rover immediately goes in that direction. It never goes straight.

PX4
MaxSonar-EZ4 | Ranges from 20cm to 765cm | MaxBotix Inc.

(Chuck Lundy) #2

I’m still having issues with the obstacle avoidance. When running in the steering mode with nothing around, it has a gradual turn to the left. In manual mode it tracks fairly straight. I doesn’t appear to be picking up objects, ie a wall. I use to get readings in tuning but now I don’t. Can you look over the log and parameters and give me some advise?
7-8-19.param (13.0 KB)

(rmackay9) #3

Chuck,

I don’t think the “dodge” method of object avoidance works very well. It’s meant for very specific conditions (the Sparkfun AVC) and isn’t really a good general purpose solution. Rover-3.7 will include some improved object avoidance features and hopefully we will start beta testing that within 6 weeks and I’ll be happy to provide support for object avoidance from then on.

If it’s just making the vehicle stop before hitting things then that should already work and I’m happy to provide support.

(rmackay9) #4

Chuck,

… to be a little more helpful though :slight_smile: I’ve had a look at your log. It looks like the range finder isn’t working at all. The RGFD.R1Dist is always zero… I think it might be the RNGFND_PIN parameter value…

(Chuck Lundy) #5

Thanks for the response. Less than 10 minutes ago, before I saw your post, I changed the RNGFND_PIN to 14 and now it works, it stops! I’ll play with “dodge” tomorrow and see if I agree with your comments.

Chuck

1 Like
(Chuck Lundy) #6

mackay9,

I tried the “dodge” today and it works, but leaves a lot to be desired. It’s speed dependent, the faster the rover moves, the closer to an object it gets before turning. I was using steer mode and will try it in auto mode tomorrow.

Chuck

1 Like
(Christopher Milner) #7

@mackay9 I would be happy to help test if you’d like. My use case would be detecting and automatically steering around tree trunks while mowing a lawn (in Auto mode) and picking up the course on the other side of the tree. Some trees are small, 5cm in diameter, and some are large, 100cm. As it stands now I have to handle trees manually when developing the mission in mission planner (these are 2-meter, 20-waypoint circles around trees). Let me know-

1 Like
(Dave) #8

That is one impressive mission. Are you mowing with this now? What GPS system are you using?

(rmackay9) #9

@chuckl74, thanks for the feedback on Dodge. I’m actually planning on removing the “Dodge” avoidance from Rover-3.6 because the new replacements should be better.

(rmackay9) #10

@Christopher_Milner,

Thanks for that, I hope we will have Rover-3.6.0 ready to start beta testing within 5 weeks… maybe a bit less…

1 Like
(Christopher Milner) #11

Yes I’m mowing. I’m using ardusimple (sourcing RTK corrections from an NTRIP caster nearby, 21km away) and getting RTK fixes with 3"-4" accuracy, enough for my mission. I’ve actually switched from spiral to straight passes since the mower spends much less time turning that way. The 2m circles (driven at 0.5 m/s) are a thing of beauty. Pics and video here https://photos.app.goo.gl/rrNTHjFD2JTFJ7Kt6.

(friday) #12

Thank you for your reply. We want to do a good obstacle avoidance in AUTO mode. Are there any good Suggestions?

(friday) #14

Hello, I would like to confirm whether pixhawk can support multiple ultrasonic waves to achieve all-round obstacle avoidance. Obstacle avoidance is not limited to one fixed direction like Dodge. I am using rover 3.5.1 firmware now. Does pixhawk support RPLidar A1 360 degree laser scanner?

(rmackay9) #15

@Friday,

Yes it does the object avoidance wiki page is here, the RPLidarA2/A3 setup page is here.

In 3.5.1 the vehicle will simply stop. In 3.6.x the vehicle will be able to path plan around obstacles as shown in this video.

(friday) #16

Hi, thanks for your reply. I know that rover 3.6 can achieve complex obstacle avoidance. If I use RPLidarA2, will its parameter setting method be the same as that of 3.5.1? If not, could you tell me how to set the parameters?

(friday) #17

Can we use the RpLidar A3 or RpLidar S1 for object avoidence?The RpLidar A3 and RpLidar S1’s baud is 256000.It seems that can not be set this baud in the Pixhawk. Do you know some method to set it up?

(rmackay9) #18

@Friday, I think ArduPilot does support 256,000 baud rates. Set the appropriate SERIALx_BAUD to 256 and I think it will work. I can’t guarantee that the RPLidar A3 will work (I’ve only used the A2) but this baud rate is supported.