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

dev environment setup scripts update #11768

Merged
merged 1 commit into from
Apr 12, 2019
Merged

dev environment setup scripts update #11768

merged 1 commit into from
Apr 12, 2019

Conversation

dagar
Copy link
Member

@dagar dagar commented Apr 2, 2019

  • Ubuntu install NuttX toolchain, gazebo, and switch to python3
  • OSX switch to python3

@dagar dagar requested a review from MaEtUgR April 2, 2019 21:24
Tools/setup/ubuntu.sh Outdated Show resolved Hide resolved
Tools/setup/ubuntu.sh Outdated Show resolved Hide resolved
@hamishwillee
Copy link
Contributor

@dagar My interest in this is as a replacement for the ubuntu Devguide scripts. I have run the script in Ubuntu 16.04 (only) from the Firmware root using source ./Tools/setup/ubuntu.sh.

  1. Installer went through to completion (log gist here) with warning There were unauthenticated packages and -y was used without --allow-unauthenticated
  2. Tried make posix jmavsim and gazebo. Fails with missing jinga2. Ubuntu suggests for debian systems try: sudo apt-get install python-jinja2 and for all others try sudo -H pip install jinja2. Installed that using `sudo apt-get install python-jinja2
  3. Then got error on missing em. But I can see empy in both pip list and pip3 list. Anyway, installed using sudo apt-get install python-empy only to get TOML error. Gave up. Thoughts?
  4. Tried FMUv5 build - failed
ubuntu@ubuntu:~/github/Firmware$ make px4fmu-v5_default
Makefile:212:  px4fmu-v5_default has been deprecated and will be removed, please use px4_fmu-v5_default!
make  px4_fmu-v5_default
make[1]: Entering directory '/home/ubuntu/github/Firmware'
-- PX4 config file: /home/ubuntu/github/Firmware/boards/px4/fmu-v5/default.cmake
-- PX4 config: px4_fmu-v5_default
-- PX4 platform: nuttx
-- PX4 lockstep: disabled
-- PX4 version: v1.9.0-beta1-456-gadf9006
-- cmake build type: MinSizeRel
CMake Error at platforms/nuttx/cmake/Toolchain-arm-none-eabi.cmake:40 (message):
  could not find genromfs
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/CMakeDetermineSystem.cmake:98 (include)
  CMakeLists.txt:263 (project)

More generally

  1. What about FastRTPS. Does this need to be installed?
  2. We use current scripts as a "base" with further instructions for other platforms - e.g. https://dev.px4.io/en/setup/dev_env_linux_ubuntu.html#snapdragon-flight or Bebop or whatever. When working, should this still be a good base for those, or will there be conflicts?
  3. Is it reasonable going forward to have a conditional flag for ROS setup, or is that a discussion for another day?

@dagar
Copy link
Member Author

dagar commented Apr 3, 2019

For Ubuntu 16.04 the problem (at least the first one) is the python dependencies. This is probably bad form, but I'm tempted to just install them all for both python2 and python3 until we can cleanly transition to python3 entirely.

  1. What about FastRTPS. Does this need to be installed?

Nice to have, but not currently needed. Skipped for now because I wanted to look for clean packages.

  1. We use current scripts as a "base" with further instructions for other platforms - e.g. https://dev.px4.io/en/setup/dev_env_linux_ubuntu.html#snapdragon-flight or Bebop or whatever. When working, should this still be a good base for those, or will there be conflicts?

Conflicts no, but it's currently more packages than we put into the base container (to keep the size down). Now that I think of it again I suppose we'll need to make the Nuttx and gazebo portions optionally so that the script can be used by PX4/containers directly.

  1. Is it reasonable going forward to have a conditional flag for ROS setup, or is that a discussion for another day?

Avoiding the ROS version discussion for now, plus the actual ROS install is straightforward copy paste from their site.

@hamishwillee
Copy link
Contributor

For Ubuntu 16.04 the problem (at least the first one) is the python dependencies. This is probably bad form, but I'm tempted to just install them all for both python2 and python3 until we can cleanly transition to python3 entirely.

Works for me. Let me know when you want retest, as long as it is tomorrow :-)

All the extra bits should ideally be conditional from an end user point of view too - and in that case including FastRTPS also makes sense as an option. But it can be a "later" option.

Is it reasonable going forward to have a conditional flag for ROS setup, or is that a discussion for another day?
Avoiding the ROS version discussion for now, plus the actual ROS install is straightforward copy paste from their site.

ROS "vanilla" setup is indeed simple, but ROS and PX4 is a hell of a lot more difficult than that, in particular to get the ROS2 stuff working nicely. @TSC21 has some scripts we could leverage. Currently in discussion about what is really needed: PX4/PX4-Devguide#764

libncurses-dev \
libtool \
pkg-config \
vim-common \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we put which xxd || sudo apt install xxd -y || sudo apt-get install vim-common --no-install-recommends -y from https://github.com/PX4/Devguide/pull/719/files#diff-57e9a9559326143dea03f6c6031f24d2R25 instead of vim-common?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like xxd is a package in Ubuntu 18.04, but I don't recall seeing it in 16.04. We could expand the conditionals near the top for Ubuntu version differences.

@MaEtUgR
Copy link
Member

MaEtUgR commented Apr 3, 2019

Cool, that's the way to go. I can do some VM testing later on.

@dagar dagar force-pushed the pr-setup_env_updates branch 2 times, most recently from 35b72ef to d946a41 Compare April 12, 2019 13:47
 - Ubuntu install NuttX toolchain, gazebo, and switch to python3
 - OSX switch to python3
@dagar dagar force-pushed the pr-setup_env_updates branch from d946a41 to 2cd75ff Compare April 12, 2019 14:13
@dagar dagar merged commit 6d30b13 into master Apr 12, 2019
@dagar dagar deleted the pr-setup_env_updates branch April 12, 2019 14:43
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.

3 participants