Pixhawk - Marvelmind

Frequent questions asked online, offline, in forums are answered here
prash319
Posts: 6
Joined: Thu Nov 24, 2016 8:04 am

Pixhawk - Marvelmind

Postby prash319 » Thu Dec 22, 2016 8:13 am

I am working on a drone with Pixhawk as my autopilot. I tried to integrate Marvelmind to Pixhawk to get position fix. Unfortunately I am coming across two issues.

1. All my connections and settings are correct. But I dont get position lock (with green light on the pixhawk) everytime. Sometimes I get it, sometimes I dont. What am I missing?

2. If I get position lock and I try to loiter, my drone drifts away to one direction. Why?
Last edited by prash319 on Tue Dec 27, 2016 9:08 am, edited 1 time in total.

User avatar
admin
Site Admin
Posts: 239
Joined: Tue Jan 26, 2016 7:06 pm
Contact:

Re: Pixhawk - Marvelmind

Postby admin » Mon Dec 26, 2016 2:39 pm

prash319 wrote:I am working on a drone with Pixhawk as my autopilot. I tried to integrate Marvelmind to Pixhawk to get position fix. Unfortunately I am coming across two issues.

1. All my connections and settings are correct. But I dont get position lock (with green light on the pixhawk) everytime. Sometimes I get it, sometimes I dont. What am I missing?

2. If I get position lock and I try to loiter, my drone drifts away to one direction. Why?



Hello,

We discussed this over the email.

BR,
Maxim

cagiva851
Posts: 10
Joined: Fri Jan 06, 2017 12:24 am

Re: Pixhawk - Marvelmind

Postby cagiva851 » Fri Jan 06, 2017 12:25 am

Maxim,

Can you post here the content of that email so others can address this issue as well?

cagiva851
Posts: 10
Joined: Fri Jan 06, 2017 12:24 am

Re: Pixhawk - Marvelmind

Postby cagiva851 » Fri Jan 06, 2017 7:26 am

Has anyone successfully used the Marvelmind kit with a quadcopter for indoor navigation by loading a mission with waypoints (e.g. takeoff, navigate to waypoints, loiter, return to origin, and land)?

The Marvelmind youtube videos shows some basic flight tests with the stationary beacons placed high on the walls. However, has anyone done it with the beacons installed at the ground level as suggested in the manual? I also wonder how the system is capable to do 3D (x,y, and z) when all the four stationary beacons are flat on the ground.

User avatar
admin
Site Admin
Posts: 239
Joined: Tue Jan 26, 2016 7:06 pm
Contact:

Re: Pixhawk - Marvelmind

Postby admin » Fri Jan 06, 2017 7:34 am

cagiva851 wrote:Has anyone successfully used the Marvelmind kit with a quadcopter for indoor navigation by loading a mission with waypoints (e.g. takeoff, navigate to waypoints, loiter, return to origin, and land)?

The Marvelmind youtube videos shows some basic flight tests with the stationary beacons placed high on the walls. However, has anyone done it with the beacons installed at the ground level as suggested in the manual? I also wonder how the system is capable to do 3D (x,y, and z) when all the four stationary beacons are flat on the ground.



Regarding the first question, let's our users to comment. I know there. But let them comment.

Regarding the second question, there is no issue with that. Imagine a pyramid. The mobile beacon is a pinnacle of the pyramid and the stationary ones are in the base. It is well doable to calculate Z as well - not only X and Y.

Hendrik
Posts: 31
Joined: Wed Dec 07, 2016 12:29 pm

Re: Pixhawk - Marvelmind

Postby Hendrik » Fri Jan 06, 2017 2:34 pm

cagiva851 wrote:Has anyone successfully used the Marvelmind kit with a quadcopter for indoor navigation by loading a mission with waypoints (e.g. takeoff, navigate to waypoints, loiter, return to origin, and land)?

The Marvelmind youtube videos shows some basic flight tests with the stationary beacons placed high on the walls. However, has anyone done it with the beacons installed at the ground level as suggested in the manual? I also wonder how the system is capable to do 3D (x,y, and z) when all the four stationary beacons are flat on the ground.


I use Marvelmind with Pixhawk on a Quadcopter with the beacons placed at 1.85m.

I have waypoints working with Missionplanner, but only without powering the motors (so manually moving the Quadcopter).
I have build a monitoring program on my iPad with motor output indicators and I can see which motors are powered more than the others and that is working correctly. I also tried with the motors running, and holding the Quadcopter by hand and feeling the directions of the Quadcopter.

My biggest problem is that Ardupilot on the Pixhawk is filtering the GPS data with EKF/EKF2. Making Pixhawk accept the raw data from Marvelmind is needed for a good working solution. Ardupilot is working on the principle that GPS data is not accurate enough so a lot of prediction is calculated and added or subtracted from the Marvelmind GPS data using IMU-data and barometer and in that way is modifying the Marvelmind data incorrectly.
Biggest problem with that was Z positioning, giving all results but no good ones especially when motors were running. (Barometer?)
I modified the Ardupilot to skip filtering and it is working somewhat better.

When motors are not running the lon,lat,Z-data is correct.

Perhaps the motors and sonars were too close.
I started building a hexacopter with more space.

I had big issues with aligning compass data when mapping the Missionplanner map over the Marvelmind map. That is working correctly now.
Cannot remember how I did that.
I will be starting testing with the Hexacopter after this weekend and must go through the whole process again.
I will keep a log of my settings, changes and hopefully successes.

cagiva851
Posts: 10
Joined: Fri Jan 06, 2017 12:24 am

Re: Pixhawk - Marvelmind

Postby cagiva851 » Fri Jan 06, 2017 8:49 pm

@admin, thanks for the pyramid explanation. However, how will that work if you are not flying in an obstacle(furniture)-free square area and navigating through corridors or hallways?

@Hendrik, thank you for chiming-in with your findings. The GPS data being filtered by the autopilot EKF/EKF2 is the same problem I'm facing. You also highlighted another potential issue regarding the motor disturbing the sonar. Maybe @admin can confirm that.

Have you tried to place the stationary beacons on the floor/ground and install the mobile beacon downwards on the belly of the copter?

I'm flying indoors so a Hexacopter will be too big for our experiment.

cagiva851
Posts: 10
Joined: Fri Jan 06, 2017 12:24 am

Re: Pixhawk - Marvelmind

Postby cagiva851 » Sat Jan 07, 2017 8:22 am

@Hendrik, In your tests, did you set BCN_LATITUDE, BCN_LONGITUDE and BCN_ALT to match your actual location? Getting these values exactly correct is not particularly important although getting it close is required in order for the compass’s declination to be correctly looked up from the small database held within ArduPilot.

You also need to be careful about the orientation because of the compass on the Pixhawk, it knows which way it's heading and it expects the GPS_INPUT values to line up with the heading (i.e. if you move east, it expects the longitude number to fall).

Hendrik
Posts: 31
Joined: Wed Dec 07, 2016 12:29 pm

Re: Pixhawk - Marvelmind

Postby Hendrik » Sat Jan 07, 2017 12:38 pm

Hi cagiva851,

With Marvelmind dashboard I mapped NESW directions correctly to my testenvironment.
1 beacon, left down, = 0,0 (ID 56)
1 beacon, right down, E (ID 81)
1 beacon, left top N (ID 27)
1 beacon Right top (ID 51)

Starting set of beacons: 81; 56,51,27
So:

ID27----------------ID51
|
| N
| |
| S
|
ID56----------------ID81

Georeferencing in modem Lat. N0.00000, Lon E0.00000
(So on the map of Mission planner and APM planner the copter is somewhere on the ocean near Africa)

So when the hedgehog is going from ID56 to ID27 it is going 0 degrees North
I returned to original Ardupilot, so lost the BCN_ parameters (which I thought were only usefull with Pozyx. I have Pozyx, I like the UWB approach, but accuracy and missing the NMEA protocol stopped that path)
I have COMPASS_AUTODEC set to 0 and COMPASS_DEC set to a value where the direction to North is conform my testenvironment.
My testenvironment at this moment is a room at home. I have a hexacopter of 1 meter and a octocopter of 1.40 meter, so testing autonomous flight indoor is very tricky.
I ordered an extra set from Marvelmind, hoping that extra beacons will increase accuracy and preventing loss off beacons by having more line-off-sights.

My test involves picking a carton with the copter, so placing the mobile beacon underneath is not possible.

Monday I will start testing.

User avatar
admin
Site Admin
Posts: 239
Joined: Tue Jan 26, 2016 7:06 pm
Contact:

Re: Pixhawk - Marvelmind

Postby admin » Sat Jan 07, 2017 5:32 pm

cagiva851 wrote:@admin, thanks for the pyramid explanation. However, how will that work if you are not flying in an obstacle(furniture)-free square area and navigating through corridors or hallways?

@Hendrik, thank you for chiming-in with your findings. The GPS data being filtered by the autopilot EKF/EKF2 is the same problem I'm facing. You also highlighted another potential issue regarding the motor disturbing the sonar. Maybe @admin can confirm that.

Have you tried to place the stationary beacons on the floor/ground and install the mobile beacon downwards on the belly of the copter?

I'm flying indoors so a Hexacopter will be too big for our experiment.




Regarding the noise from motors and about the noise in general - previous post (viewtopic.php?f=2&t=698&p=1063#p1063). The same, but with other words:
- While traced, mobile beacon emits and stationary beacons listen. So, if the copter flies too close to stationary beacons, they may be affected. What exactly "too close" means, depends on many things
- Mobile beacon emits. In that frequency band where it emits, the mobile beacon certainly "outshouts" any noise from the motors, but only, if the settings are proper. For example, you have to manually reduce the gain in Ultrasonic menu in the Dashboard. If you don't do that, the signal/noise ratio will be reduced. Signal will be in saturation, but noise will be amplified. Reduce the gain manually and find the value that returns signal strong enough for to trigger the threshold, but still not saturating the signal. Noise will be heavily reduced
- Keep the threshold on the right level. If it is too low, it will be triggered by noise. If it is too high, even your own signal won't trigger it
Finding a proper balance between gain, trigger and noise is the key. It is pretty easy doable. But it depends on many parameters, such as, power of motors, proximity to stationary beacons, gain settings, threshold settings, manual gain or AGC, etc. Play with it, understand the logic and you will find the solution
- Use the embedded oscilloscope to monitor the signal level and noise level. It is perfect for gain settings and finding real signal/noise ratio


Return to “FAQ”

Who is online

Users browsing this forum: No registered users and 2 guests