How do you start dronekit with a certain ArduCopter version?

Am using Dronekit 2.8.1 and Dronekit-SITL 3.2.0.

How do I get dronekit to start with ArduCopter 3.6.7?

Thanks,

Paul

I know that a release specific SITL can be started with dronekit-sitl copter-X.X.X where X’s are for release numbers but not sure whether copter-3.6.7 exist as prebuilt or not.
However you can build it from source.
git clone https://github.com/ArduPilot/ardupilot.git will give you the whole repository.
After the clone, you can list the tags with git tag -l and then checkout a specific tag:
git checkout tags/<tag_name>
Even better, checkout and create a branch (otherwise you will be on a branch named after the revision number of tag):
$ git checkout tags/<tag_name> -b <branch_name>
And tag name would be Copter-3.6.7 in your case.
Please look at the following pages:
http://ardupilot.org/dev/docs/building-setup-linux.html
http://ardupilot.org/dev/docs/setting-up-sitl-on-linux.html

Am using Dronekit 2.8.1 and Dronekit-SITL 3.2.0.

How do I get dronekit to start with ArduCopter 3.6.7?

We’ve started to compile up more recent binaries, but I do need to find
time to modify dronekit-sitl to use them :slight_smile:

In the meantime you can set a pair of environment variables to point to
your own binaries.

SITL_BINARY
SITL_DEFAULTS_FILEPATH

Something like this:

SITL_DEFAULTS_FILEPATH=/home/pbarker/rc/ardupilot/Tools/autotest/default_params/copter-heli.parm
SITL_BINARY=/home/pbarker/rc/ardupilot/build/sitl/bin/arducopter-heli
python examples/vehicle_state/vehicle_state.py

You should be able to download suitable SITL binaries from our firmware
server… assuming you’re on x86-64 or arm32hf

Paul

Peter


Visit Topic or reply to this email to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, click here.

Peter Barker | Programmer,Sysadmin,Geek.
pbarker@barker.dropbear.id.au | You need a bigger hammer.
:: It’s a hack! Expect underscores! - Nigel Williams

Thanks Peter, it’s all good. Running simulated missions is very helpful and a great feature.

Thanks for your fine work,

Paul

Another question:

How do you modify and add to the parameters with which Dronekit and SITL start?

Thanks,

Paul

On your terminal:
cd
sudo nano .bashrc
Add these following lines:
SITL_DEFAULTS_FILEPATH=/home/$USER/ardupilot/Tools/autotest/default_params/copter-heli.parm
SITL_BINARY=/home/$USER/ardupilot/build/sitl/bin/arducopter-heli
I assumed that you pulled the git repository to your home folder.
You can edit the lines as you like.
Save and exit (press Ctrl + X and press y and press enter)
Then close and open the terminal or:
source .bashrc
I think it should work.

Mustafa,

I added the PATH lines at the end of the .bashrc file. Still did not work.

Maybe I added the parameters incorrectly. I added these two, but there is no change in the simulated flight:

RTL_ALT 475
WPNAV_SPEED_DN 300

I saw no apparent syntax in the copter.parm file other than a space between the parameter name and the value.

Thank for any ideas.

Paul

.bashrc parameters are for the starting the simulation.
What you want to set are the vehicle parameters.
You should set them on the .parm file or your can set them manually in the mavproxy.py like:
param set RTL_ALT 475
param set WPNAV_SPEED_DN 300
And check whether they are set or not using:
param get RTL_ALT
param get WPNAV_SPEED_DN
Let me know if it works :slight_smile:

Mustafa,

I tried setting the parameters in the copter.parm file (not the .bashrc) and there was no change.

I’ll try setting them manually tomorrow and report back here.

Thanks again,

Paul

But it should change the parameters.
May be you are editing the wrong .parm file.
Please be sure.
Regards…

Mustafa,

The script I am running starts dronekit-sitl with this command:

/usr/local/bin/dronekit/sitl/copter…

…and some arguments for home location and initial heading.

If starting dronekit-sitl that way, which parameter file does it use?

Thanks,

Paul

I do not know about that since i am using sim_vehicle.py to build the SITL from source.
Here’s the sample command:
sim_vehicle.py --add-param-file /home/m/ardupilot/Tools/autotest/default_params/gazebo-zephyr.parm -v ArduPlane -f gazebo-zephyr -I0
You may change the parameter file to anything that you desired.