Morse 3D simulator with ArduPilot

Over the past few days @tridge has added support for the Morse robotics simulator which uses the Blender game engine to produce high quality 3D renderings of the environment. It also supports many different sensors including 360 lidar so this will be a good testing environment for work on object avoidance.

For developers interested in giving it a try, the setup instructions are here. So far it works only on Linux/Ubuntu environments. If you run into troubles feel free to reach out to us in the ArduPilot Gitter chat.

The simulator has been tested with Copters and Rovers but it is likely that more vehicles will be added in the future (submarines perhaps?).

1 Like

In addition to that:
Its fairly easy to load your own terrain data into Blender.
Have a look at “BlenderGIS”:

1 Like

Interesting! Would you be able to do some docs on how to use that with ArduPilot?
For example, having the CMAC SITL location as data we can load would be great. Or a real village.
Cheers, Tridge

I’ve managed to get Morse running natively in Windows. Required a few patches though (see Full details for the build are in the “winbuild.bat” file in the repo - it’s a bit tricky requiring the exact same python version in Blender and the user’s system.

Besides the patches, I’ve noticed that Morse doesn’t appear to be sending proximity sensor data to Ardupilot and the camera controls are a bit … wild.

1 Like

great, well done!

are you planning to PR those to the morse project?

try “telnet localhost 60000” and see if the proximity sensor data is showing up there
Cheers, Tridge

Yep, doing that now :slight_smile:

Yeah, it’s coming through on there

ok, then could either be parameter settings for proximity sensor, or parsing in SIM_Morse.cpp
See this code for parsing:

maybe add some printf() calls to debug that, or step through it with gdb

So I’ve setup Morse on Ubuntu too, with the same (non-avoidance) behaviour as I saw on Windows. So could be something with the rover_scanner.parm file?

For reference, here’s the mission I’ve been running - it runs quite nicely into a tree at the moment! dodge1.txt (495 Bytes)

do you know that copter and rover don’t do avoidance in AUTO mode at the moment? That is waiting on us integration our mission avoidance code from OBC2018

The rover documentation appears to say otherwise:

Actually the issue is that Rover does “dodge” but only using forward facing lidar. It cannot use proximity sensors for dodge. I’ll update the docs and/or allow proximity to be used.

1 Like

It might be worth mentioning in the documentation that only some sensors can be used for dodge. The way I understood before was that any ranged sensor(s) could be used for avoidance.

we should also add a fwd looking lidars to the Morse simulation

@stephendade, I’ve added a warning in the rover object avoidance wiki page to specify that “dodge” avoidance only works with 1D lidar.

I spent quite a bit of time yesterday trying to make dodge work with the proximity sensors. I suspect I got it working as well as it does with regular lidar but it still doesn’t work well. The real solution is to have an AC_Avoid::adjust_waypoint that shifts the target around so that the vehicle avoids obstacles. This is pretty much what Tridge & Co’s OBC avoidance library does.

Hey, just tried this with copter today on Linux, looks pretty cool! :slight_smile:

Unfortunately I’m not familiar with blender at all. Can the “camera” follow the vehicle somehow? I tried running a test script and the drone just flew right out of view ^^.


It’s apparently possible to make the camera follow the vehicle but I’m also not familiar enough with Blender/Morse to know how to set that up.

Anyone knows if it is possible to use lidars to get the drone follow a path or wires in the air. Such as powerlines below the drone?

@Arny1719, I’ve heard of at least one person attempting to do autonomous powerline inspection with AP but they were doing the powerline recognition outside of AP. So AP doesn’t include that part but certainly the flying part it can do.

1 Like

Thank you Randy for the useful information.
Think we then have to make an separate system for powerline tracking.
I post it here if we got into problems with the protocol for Cube communication.

1 Like