Created
October 30, 2023 05:09
-
-
Save srathi-monarch/15cc7143382632cf24eff056e23c7f11 to your computer and use it in GitHub Desktop.
Example of using venvs with ROS.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <launch> | |
| <node name="lanenet" pkg="lanenet" type="test_lanenet.py" | |
| launch-prefix="$(find lanenet)/launch/with_venv.sh $(find lanenet)"> | |
| </node> | |
| </launch> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Running | |
| # with_venv.sh <lanenet package directory> <rosrun args...> | |
| source "${1}/venv/bin/activate" | |
| PYTHONPATH="${PYTHONPATH}:${1}/src/lanenet-lane-detection" python "${@:2}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment