Question about reference frames and an error in building the code

Hello!
My question: Why is it that vehicle obstacles have an inertial frame of North, East, Down, but the copter/ownship has a frame of North, East, Up?

My error: I tried to compile the code using SITL because I don’t own any hardware, but I get this error message in cygwin:

ap_library: AP_BattMonitor not found

I cloned the code from the repository verbatim, and I’m not sure why this would not work. Any ideas on how to fix this?

Thanks,
Jimmy

1 Like

Hi @skybound. About your first question… Can you point me towards the code you’re talking about? Just attach a link here. I might be able to help.

2 Likes

did you do a “git submodule update --recursive” ?

1 Like

Hey @rishabsingh3003, thank you for responding!

I first saw it in AP_Avoidance, on line 636: vec_neu.

My question is similar to this question, I just wonder why there’s the distinction between up and down?

Thanks again!

Hi @amilcarlucas, thank you too for responding!
I did not do that, as I am typing this I will try it out (I’m trying to learn how to use gitkraken as opposed from doing everything from the terminal haha).

I do have a question though, if my code is up to date, wouldn’t that make all the submodules up to date as well? Or is a submodule a separate thing that needs to be independently updated?

Submodules are independent, and need a separated update command.
This info is also on the readme and on the scripts.

I see what you mean, it looks like gitkraken automatically finds all the submodules (I think there are 7 total?). I had some weird issue with a detached head for two files that dealt with cygwin. By staching them, I was able to pull the new versions and cygwin seems to be compiling happily now.

Can you point out where in the readme the submodule information is? I’m sure it’s there, I guess my eyes are too glazed by looking at all of this and I can’t find it hahahah!

Thanks again for the help! I doubt I would’ve been able to figure that on my own, so it was truly appreciated!

Any insight as to the rational behind having NED and NEU as two inertial frames?

Mosttimes Ardupilot used NED reference frames. But sometimes we do need to interface with other systems that use NEU and therfor we do need both frames

1 Like

Thanks! Where could I look to find an example of when it’s necessary to use both? Are those systems that use NEU different/not a native part of Ardupilot? I guess I’m struggling to understand when a third coordinate system would be necessary, especially one so similar.

Probably the GPS code has some transformations.
All are native and included in the code.

I’ll poke around in there, I’m assuming AP_GPS?

Is there a way to make/compile the entire ardupilot master folder, not just for a specific board/vehicle? For example, I think in linux, if I input:

cd ardupilot/
git submodule update --init --recursive
make linux

I think that would compile the entire solution. Is there a way to do this with cygwin? My end goal here is to be able to mess with it in Visual Studios, specifically to create a code map using the Architecture feature. Right now, VS doesn’t think the code is built, and I’m getting 4 different errors regarding CMake and avr-gcc.

replace make linux with:

./waf configure --board=linux
./waf copter
1 Like