Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SITL: Added quadcopter morse example with laser scanner #14370

Merged
merged 2 commits into from
Jan 3, 2021

Conversation

rishabsingh3003
Copy link
Contributor

@rishabsingh3003 rishabsingh3003 commented May 14, 2020

This PR is an attempt to make things simpler and more convinent for some people who might want to use Morse with a laser scanner enabled quad.

An odd thing about this script:
I have placed the laser scanner 1 meter above the quad, and not a few cm's below because on startup the scanner tends to send false readings due to it detecting the ground. Also I have turned off fastmode to make obstacle visualization easier.
Any suggestion for parameter changes are welcome. Thanks :)

To use: run these two commands in two separate terminals

  • morse run libraries/SITL/examples/Morse/quad_scanner.py

  • Tools/autotest/sim_vehicle.py -v ArduCopter --model morse-quad --add-param-file=libraries/SITL/examples/Morse/quad_scanner.parm --console --map

Ill update Morse documentation too if this is merged.

@peterbarker
Copy link
Contributor

Are those false readings a problem in the data coming from Morse?

There's no way we can tweak the rangefinder parameters to use a within-minimum-distance state?

@rishabsingh3003
Copy link
Contributor Author

Are those false readings a problem in the data coming from Morse?

There's no way we can tweak the rangefinder parameters to use a within-minimum-distance state?

@peterbarker I'll mess around with the parameters a bit more and see if a solution is possible.

@peterbarker
Copy link
Contributor

OK, so I can't get Morse to run with the instructions on ArduPilot.org - even with a whole bunch of hacking.

trusty fails because the QuadRotorDynamics class doesn't exit.

bionic fails because local_data["engines"] goes away with an exception in the Morse libraries in the motors actuator (and is replaced with steer/thrust/something).

focal fails because Blender's 2.80 API has changed sufficiently to break Morse's use of it.

How are people actually using Morse with ArduPilot?

@auturgy
Copy link
Contributor

auturgy commented Aug 16, 2020 via email

@rishabsingh3003
Copy link
Contributor Author

Hi @peterbarker . I have been using Morse + SITL everyday since the past three months on Ubuntu 16/18. It works very nicely with SITL( except rover skid steering, which is a little broken and I mean to fix it soon)
The key is:
Do not use blender version above 2.79.0
Rest everything written on the documentation works and you can use this PR's script for lidar on quadcopter!

rishabsingh3003 and others added 2 commits January 3, 2021 17:50
Matches the value we send for Rover, which is useful until we can
reflect on the simulation to discover its maximum range
@peterbarker
Copy link
Contributor

I've rebased this on top of changes to the way OBSTACLE_DISTANCE is sent in Morse.

I've also changed the range of the rangefinder to match the Rover one. Ideally we request the rangefinder config from the simulation and use that, but we do need to know what the max range is.

Will merge this once it passes CI.

@rishabsingh3003
Copy link
Contributor Author

LGTM. Thanks!

@peterbarker peterbarker merged commit 995f5d1 into ArduPilot:master Jan 3, 2021
@peterbarker
Copy link
Contributor

Merged, thanks!

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

Successfully merging this pull request may close these issues.

3 participants