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

Document interactive development of mavproxy #6371

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Ryanf55
Copy link
Contributor

@Ryanf55 Ryanf55 commented Nov 6, 2024

Purpose

Existing Workflow

image

New Workflow

Now, when you change code, it updates when you just kill mavproxy and run it again.

image

@Ryanf55 Ryanf55 force-pushed the mavproxy-venv-interactive branch from 70afbea to b94bc77 Compare November 6, 2024 02:46
@Ryanf55 Ryanf55 marked this pull request as ready for review November 6, 2024 02:46
@Ryanf55 Ryanf55 marked this pull request as draft November 6, 2024 03:12
Copy link
Contributor

@peterbarker peterbarker left a comment

Choose a reason for hiding this comment

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

Wouldn't a user ordinarily be in the ArduPilot venv here? It seems you're creating a new venv as part of these instructions...

mavproxy/source/docs/development/mavdevenvlinux.rst Outdated Show resolved Hide resolved
mavproxy/source/docs/development/mavdevenvlinux.rst Outdated Show resolved Hide resolved
@Ryanf55 Ryanf55 force-pushed the mavproxy-venv-interactive branch from b94bc77 to 7667f70 Compare November 6, 2024 03:32
* Use a venv and develop mode from setup.py

Signed-off-by: Ryan Friedman <25047695+Ryanf55@users.noreply.github.com>
@Ryanf55 Ryanf55 force-pushed the mavproxy-venv-interactive branch from 7667f70 to 589f38a Compare November 6, 2024 04:13
@Ryanf55
Copy link
Contributor Author

Ryanf55 commented Nov 6, 2024

Wouldn't a user ordinarily be in the ArduPilot venv here? It seems you're creating a new venv as part of these instructions...

These instructions are for an isolated env. If the instructions are making an assumption you use the ardupilot rep's venv, then maybe it's worth adding that as a prerequisite. I've found it's not required to share the same environment for both repos.

Also, I saw that MAVProxy would be installed twice.
https://github.com/ArduPilot/ardupilot/blob/c0ee3b22163da1b77fcc7362aa6e0e3a8c6a9f8d/Tools/environment_install/install-prereqs-ubuntu.sh#L166

@Ryanf55
Copy link
Contributor Author

Ryanf55 commented Nov 8, 2024

How are we supposed to install the wsproto dependency of pymavlink?

https://github.com/ArduPilot/pymavlink/pull/967/files#diff-4d7c51b1efe9043e44439a949dfd92e5827321b34082903477fd04876edb7552R10

  • ardupilot/ools/scripts/install-prereqs-ubuntu.sh doesn't have it
  • The setup.py file of pymavlink doesn't have it, only the requirements.txt
  • We don't ever tell devs to install pymavlink's requirements.txt

@Ryanf55
Copy link
Contributor Author

Ryanf55 commented Nov 16, 2024

@peterbarker Can you explain why the ardupilot virtual environment is necessary? The docs don't seem to agree. Here's why:

The ardupilot setup is explained as the setup for building the Ardupilot code with waf:
image

Which prompts you on adding the venv to your bashrc:
https://github.com/ArduPilot/ardupilot/blob/4d75b4477550e3fccb6a1917dd8a49594d3d2c9b/Tools/environment_install/install-prereqs-ubuntu.sh#L394
And is not recommended in the wiki which option to chose

If you just start with MAVProxy, which does not even reference the Ardupilot environment install
image

Then, why would a developer know that the have to install MAVProxy INSIDE of the ardupilot repo's virtual environment?

If this is actually true, then shouldn't it be documented that this is the only supported workflow ?

@peterbarker
Copy link
Contributor

OK, sorry, I wasn't away you'd linked the MAVProxy Wiki there.

So someone wants to develop ArduPilot will get MAVProxy as part of the environment install script - but not give them a development environment.

You're trying to add words around developing MAVProxy inside the ArduPilot Wiki here - and they are conflicting with words over in the ArduPilot docco.... perhaps the MAVProxy Wiki should acknowledge you may want to work within the ArduPilot venv. The MAVProxy docs you link to need updating anyway - they won't work well without a venv now, and that's not called out.

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.

2 participants