Using SITL only for part of the code

Hello guys,

I really want to contribute to a project, but I’m new to this topic. So I’m working through the ardupilot.com developer pages. I read and built with ‘make px4-v2’ the example sketches for some libraries and uploaded them with ‘make px4-v2-upload’ on the Pixhawk of my Iris. With mavproxy I can look at the output. So far so good.

Is there a possibility to upload the code to a “virtual” Pixhawk or emulator and test the code directly on my computer?

I also set up SITL, but I can only run the whole ArduPlane or ArduCopter Code and not just the example sketches.

Is there a possibility to simulate just part of the code or the example sketches with SITL?

An answer to just one of the questions would be very helpful.

Thank you very much.

As far as I know there is no virtual Pixhawk or emulator.
I have only ever used SITL for the entire ArduPilot vehcile i.e a Rover or Plane.

Thanks, Grant.

Thanks Grant,

but do you know if it’s possible to simulate just the example sketches? I tried to run sim_vehicle.sh in the example directory but then I get an error message:
"eeprom.bin in the starting directory contains the parameters for your
simulated vehicle. Always start from the same directory. It is recommended that
you start in the main vehicle directory for the vehicle you are simulating,
for example, start in the ArduPlane directory to simulate ArduPlane
"
I also tried to copy the example sketches into the main vehicle directory, but this didn’t work either.

Thanks,
Thomas