You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug Report] conda activate orbit using incorrect path for setup_python_env.sh #407
If you are submitting a bug report, please fill in the following details and use the tag [bug].
Describe the bug
Another issue noticed when attempting to resolve installations issue described in #406
When attempting to activate orbit environment, it fails to find setup_python_env.sh because it is looking in the current, Orbit repo directory instead of the _isaac_sim symbolic linked directory where it should.
Steps to reproduce
Please try to provide a minimal example to reproduce the bug. Error messages and stack traces are also helpful.
conda activate orbit
/home/mattm/repos/orbit/_isaac_sim/setup_conda_env.sh:.:20: no such file or directory: /home/mattm/repos/orbit/setup_python_env.sh```
setup_conda_env.sh
#!/bin/bash
SCRIPT_DIR="$(cd"$( dirname "${BASH_SOURCE[0]}")"&&pwd)"
MY_DIR="$(realpath -s "$SCRIPT_DIR")"# path=$SCRIPT_DIR# while [[ $path != / ]];# do# if ! find "$path" -maxdepth 1 -mindepth 1 -iname "_build" -exec false {} +# then# break# fi# # Note: if you want to ignore symlinks, use "$(realpath -s "$path"/..)"# path="$(readlink -f "$path"/..)"# done# build_path=$path/_buildexport CARB_APP_PATH=$SCRIPT_DIR/kit
export EXP_PATH=$MY_DIR/apps
export ISAAC_PATH=$MY_DIR.${MY_DIR}/setup_python_env.sh
Work around?
Running conda activate orbit from the ISAACSIM_PATH allows the script to find the setup_python_env.sh file; however, I don't think this should be required
Upon further investigation I think the issue is with the use of BASH_SOURCE[0]
I am using Zsh and this variable is not defined when running the script resulting in the wrong path being set for $MY_DIR thus the wrong path to find setup_python_env.sh
I changed ${BASH_SOURCE[0]}" to $0 and added log statements to verify, and conda activate seems to work now!
I think setup_conda_env.sh comes from installation of Isaac sim so I am not sure where to send PR to fix, but this is what I arrived at so both Bash and Zsh (and hopefully others work)
if [ -n"$BASH_VERSION" ];then# Bash
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")"&& pwd)else# Fallback for other shells
SCRIPT_DIR=$(cd "$(dirname "$0")"&& pwd)fi
Activity
mattmazzola commentedon May 10, 2024
Upon further investigation I think the issue is with the use of
BASH_SOURCE[0]I am using Zsh and this variable is not defined when running the script resulting in the wrong path being set for $MY_DIR thus the wrong path to find
setup_python_env.shI changed
${BASH_SOURCE[0]}"to$0and added log statements to verify, and conda activate seems to work now!It looks like
BASH_SOURCE[0]is used in different places throughout the repo which may mean this problem would exist in many places.Solution
I think
setup_conda_env.shcomes from installation of Isaac sim so I am not sure where to send PR to fix, but this is what I arrived at so both Bash and Zsh (and hopefully others work)mattmazzola commentedon May 10, 2024
The above comment only solved the issue about activating orbit environment.
However, it did not fix the issue with modules.
Here is more complete solution: #103 (comment)
Changes run_all_tests.py --timeout argument to be an int (isaac-sim#408)
Changes run_all_tests.py --timeout argument to be an int (isaac-sim#408)
Changes run_all_tests.py --timeout argument to be an int (isaac-sim#408)