Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make install-prereqs-ubuntu.sh work with newer versions of Ubuntu #1192

Closed
wants to merge 2 commits into from

Conversation

arthurbenemann
Copy link
Contributor

Currently, the following setup pages both have something missing when trying to compile or simulate.
http://dev.ardupilot.com/wiki/building-px4-for-linux-with-make/
http://dev.ardupilot.com/wiki/setting-up-sitl-on-linux/

I tried to fix this by making the install-prereqs-ubuntu.sh correctly install everything that's needed. Here are the changes I did:

  • Install libraries for 64bit Ubuntu systems.
  • Less noise apt-get output
  • Install packages required for SITL simulation
  • Install pymavlink, MAVProxy and droneapi
  • Remove modemmanager package
  • Add Tools/autotest/ to the path
  • Support for relative paths
  • Install ARM toolchain at /opt

The script has been tested in a VM running a clean install of Ubuntu 14.04 LTS.

How to use it

The steps required for installing the environment are:
(please not that you will need to checkout my ubuntu_script branch while this PR is not merged)

# Install git
sudo apt-get -qq -y install git

# Clone the source
git clone https://github.com/diydrones/ardupilot.git

# Run the install-prereqs-ubuntu.sh script
ardupilot/Tools/scripts/install-prereqs-ubuntu.sh -y

# Reload the path (log-out and log-in to make permanent)
. ~/.profile

To build the code (e.g. AC for pixhawk):

# Build for ArduCopter
cd ~/ardupilot/ArduCopter
make configure
make px4-v2

To run a SITL simulation:

cd ~/ardupilot/ArduCopter
make configure
sim_vehicle.sh

* Install libraries for 64bit Ubuntu systems.
* Less noise apt-get output
* Install packages required for SITL simulation
* Install pymavlink, MAVProxy and droneapi
* Remove modemmanager package
* Add autotest/ to the path
Install the required projects (PX4*) in the same folder from where the script is called.
Install the arm toolchain at /opt
@arthurbenemann
Copy link
Contributor Author

arthurbenemann@284a18f
Added support for installing the project files at any path. For most users this will not change anything since they will be calling from the home directory.

The toolchain is now installed at /opt, leaving the user home directory more clean.

@arthurbenemann arthurbenemann changed the title tools: Make install-prereqs-ubuntu.sh work with newer versions of Ubuntu Make install-prereqs-ubuntu.sh work with newer versions of Ubuntu Jul 6, 2014
@arthurbenemann arthurbenemann mentioned this pull request Jul 12, 2014
@tridge
Copy link
Contributor

tridge commented Jul 15, 2014

applied, thanks Arthur!

@tridge tridge closed this Jul 15, 2014
@arthurbenemann arthurbenemann deleted the ubuntu_script branch July 15, 2014 02:48
@arthurbenemann
Copy link
Contributor Author

I'll update the wiki tomorrow.

@djnugent
Copy link
Contributor

After running the script I had to install libc6-dev-i386 to actually get the code to compile on my computer. I was having errors with gcc-arm-none-ebai. Not sure why, thought I would share.

@arthurbenemann
Copy link
Contributor Author

@djnugent We have the libc6-i386 package on line L13, maybe we should add the dev version as well. But I'm not sure what is the difference. I tested this in a clean Ubuntu 14.04 VM, and travis-CI builds it on Ubuntu 12.04 I think.

@djnugent
Copy link
Contributor

Oh also running the script did not put sim_vehicle.sh in PATH. It never ran step 4 from the SITL setup guide. May have been an error on my end. Still trying to get situated with the development environment.

@arthurbenemann I am running Ubuntu 13.10 on a chromebook(CR-48). It had a weird install of Ubuntu. Probably a rare case.

edit: I assumed the script ran the entire setup. It looks like it only installs the proper software. My bad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants