Commit ca91d85f authored by Mayank Mittal's avatar Mayank Mittal

fixes the usage of orbit.sh

parent 9eb78106
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
*.tmp *.tmp
# Isaac-Sim packman # Isaac-Sim packman
_isaac_sim _isaac_sim*
_repo _repo
_build _build
.lastformat .lastformat
......
...@@ -76,7 +76,7 @@ following command in the terminal: ...@@ -76,7 +76,7 @@ following command in the terminal:
.. code:: bash .. code:: bash
./orbit.sh --format ./orbit.sh --format # or `./orbit.sh -f`
Maintaining a changelog Maintaining a changelog
----------------------- -----------------------
......
...@@ -248,4 +248,4 @@ To run over the entire repository, please execute the following command in the t ...@@ -248,4 +248,4 @@ To run over the entire repository, please execute the following command in the t
.. code:: bash .. code:: bash
./orbit.sh --format ./orbit.sh --format # or `./orbit.sh -f`
...@@ -140,12 +140,13 @@ utilities to manage extensions: ...@@ -140,12 +140,13 @@ utilities to manage extensions:
./orbit.sh --help ./orbit.sh --help
usage: orbit.sh [-h] [-i] [-e] [-p] [-s] -- Utility to manage extensions in Isaac Orbit. usage: orbit.sh [-h] [-i] [-e] [-f] [-p] [-s] -- Utility to manage extensions in Isaac Orbit.
optional arguments: optional arguments:
-h, --help Display the help content. -h, --help Display the help content.
-i, --install Install the extensions inside Isaac Orbit. -i, --install Install the extensions inside Isaac Orbit.
-e, --extra Install extra dependencies such as the learning frameworks. -e, --extra Install extra dependencies such as the learning frameworks.
-f, --format Run pre-commit to format the code and check lints.
-p, --python Run the python executable (python.sh) provided by Isaac Sim. -p, --python Run the python executable (python.sh) provided by Isaac Sim.
-s, --sim Run the simulator executable (isaac-sim.sh) provided by Isaac Sim. -s, --sim Run the simulator executable (isaac-sim.sh) provided by Isaac Sim.
...@@ -180,11 +181,11 @@ To build all the extensions, run the following commands: ...@@ -180,11 +181,11 @@ To build all the extensions, run the following commands:
.. code:: bash .. code:: bash
./orbit.sh --install ./orbit.sh --install # or `./orbit.sh -i`
- For installing all other dependencies (such as learning - For installing all other dependencies (such as learning
frameworks), execute: frameworks), execute:
.. code:: bash .. code:: bash
./orbit.sh --extra ./orbit.sh --extra # or `./orbit.sh -e`
...@@ -77,11 +77,12 @@ install_orbit_extension() { ...@@ -77,11 +77,12 @@ install_orbit_extension() {
# print the usage description # print the usage description
print_help () { print_help () {
echo -e "\nusage: $(basename "$0") [-h] [-i] [-e] [-p] [-s] -- Utility to manage extensions in Isaac Orbit." echo -e "\nusage: $(basename "$0") [-h] [-i] [-e] [-f] [-p] [-s] -- Utility to manage extensions in Isaac Orbit."
echo -e "\noptional arguments:" echo -e "\noptional arguments:"
echo -e "\t-h, --help Display the help content." echo -e "\t-h, --help Display the help content."
echo -e "\t-i, --install Install the extensions inside Isaac Orbit." echo -e "\t-i, --install Install the extensions inside Isaac Orbit."
echo -e "\t-e, --extra Install extra dependencies such as the learning frameworks." echo -e "\t-e, --extra Install extra dependencies such as the learning frameworks."
echo -e "\t-f, --format Run pre-commit to format the code and check lints."
echo -e "\t-p, --python Run the python executable (python.sh) provided by Isaac Sim." echo -e "\t-p, --python Run the python executable (python.sh) provided by Isaac Sim."
echo -e "\t-s, --sim Run the simulator executable (isaac-sim.sh) provided by Isaac Sim." echo -e "\t-s, --sim Run the simulator executable (isaac-sim.sh) provided by Isaac Sim."
echo -e "\n" >&2 echo -e "\n" >&2
...@@ -103,8 +104,8 @@ fi ...@@ -103,8 +104,8 @@ fi
while [[ $# -gt 0 ]]; do while [[ $# -gt 0 ]]; do
# read the key # read the key
case "$1" in case "$1" in
# install the python packages in omni_isaac_orbit/source directory
-i|--install) -i|--install)
# install the python packages in omni_isaac_orbit/source directory
echo "[INFO] Installing extensions inside orbit repository..." echo "[INFO] Installing extensions inside orbit repository..."
# recursively look into directories and install them # recursively look into directories and install them
# this does not check dependencies between extensions # this does not check dependencies between extensions
...@@ -116,16 +117,16 @@ while [[ $# -gt 0 ]]; do ...@@ -116,16 +117,16 @@ while [[ $# -gt 0 ]]; do
unset install_orbit_extension unset install_orbit_extension
shift # past argument shift # past argument
;; ;;
# install the python packages for supported reinforcement learning frameworks
-e|--extra) -e|--extra)
# install the python packages for supported reinforcement learning frameworks
echo "[INFO] Installing extra requirements such as learning frameworks..." echo "[INFO] Installing extra requirements such as learning frameworks..."
python_exe=$(extract_isaacsim_python) python_exe=$(extract_isaacsim_python)
# install the rl-frameworks specified # install the rl-frameworks specified
${python_exe} -m pip install -e ${ORBIT_PATH}/source/extensions/omni.isaac.orbit_envs[all] ${python_exe} -m pip install -e ${ORBIT_PATH}/source/extensions/omni.isaac.orbit_envs[all]
shift # past argument shift # past argument
;; ;;
# run the python provided by isaacsim
-p|--python) -p|--python)
# run the python provided by isaacsim
python_exe=$(extract_isaacsim_python) python_exe=$(extract_isaacsim_python)
echo "[INFO] Using python from: ${python_exe}" echo "[INFO] Using python from: ${python_exe}"
shift # past argument shift # past argument
...@@ -133,8 +134,8 @@ while [[ $# -gt 0 ]]; do ...@@ -133,8 +134,8 @@ while [[ $# -gt 0 ]]; do
# exit neatly # exit neatly
break break
;; ;;
# run the simulator exe provided by isaacsim
-s|--sim) -s|--sim)
# run the simulator exe provided by isaacsim
isaacsim_exe=$(extract_isaacsim_exe) isaacsim_exe=$(extract_isaacsim_exe)
echo "[INFO] Running isaac-sim from: ${isaacsim_exe}" echo "[INFO] Running isaac-sim from: ${isaacsim_exe}"
shift # past argument shift # past argument
...@@ -142,8 +143,9 @@ while [[ $# -gt 0 ]]; do ...@@ -142,8 +143,9 @@ while [[ $# -gt 0 ]]; do
# exit neatly # exit neatly
break break
;; ;;
# run the formatter over the repository
-f|--format) -f|--format)
# run the formatter over the repository
# check if pre-commit is installed
if ! command -v pre-commit &>/dev/null; then if ! command -v pre-commit &>/dev/null; then
echo "[INFO] Installing pre-commit..." echo "[INFO] Installing pre-commit..."
pip install pre-commit pip install pre-commit
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment