Skip to content

Commit bd1f2a8

Browse files
committed
issaclab: move install script to PostCreate
Signed-off-by: Gonçalo Negrier Duarte <gonegrier.duarte@gmail.com>
1 parent 429e671 commit bd1f2a8

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

.devcontainer/hooks/postCreate.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,15 @@ if [ -h "$WORKSPACE_ROOT/rob_ws" ] && [ -h "$WORKSPACE_ROOT/trsa_ws" ]; then
2727
echo "source $WORKSPACE_ROOT/trsa_ws/install/setup.bash" >> ~/.bashrc
2828
fi
2929

30+
# Install IsaacLab and IsaacSim if isaac_ros-dev exist
31+
if [ -h "/home/$USERNAME/isaac_ros-dev" ]; then
32+
ln -sf /home/$USERNAME/isaac_ros-dev "$WORKSPACE_ROOT/"
33+
echo "export ISAAC_ROS_WS=/home/$USERNAME/isaac_ros-dev" >> ~/.bashrc
34+
echo "Installing Isaac Sim and Isaac Lab"
35+
$WORKSPACE_ROOT/.devcontainer/scripts/issaclab-pyenv.sh
36+
echo 'alias issacload="source ~/isaac_ros-dev/env_isaacsim/bin/activate"' >> ~/.bashrc
37+
fi
38+
3039
# Add useful allias
3140
echo 'alias ros2_cmake_pkg="ros2 pkg create --build-type ament_cmake"' >> ~/.bashrc
3241
echo 'alias ros2_python_pkg="ros2 pkg create --build-type ament_python"' >> ~/.bashrc

.devcontainer/hooks/postStart.sh

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,4 @@ git submodule update --init --recursive
1717
rosdep install --ignore-src --from-path "/home/$USERNAME/rob_ws" -y
1818
rosdep install --ignore-src --from-path "/home/$USERNAME/trsa_ws" -y
1919
rosdep install --ignore-src --from-path "/home/$USERNAME/isaac_ros-dev" -y || continue
20-
pip install -r "$WORKSPACE_ROOT/requirements.txt"
21-
22-
# Install IsaacLab and IsaacSim if isaac_ros-dev exist
23-
if [ -d "/home/$USERNAME/isaac_ros-dev" ]; then
24-
ln -sf /home/$USERNAME/isaac_ros-dev "$WORKSPACE_ROOT/"
25-
echo "export ISAAC_ROS_WS=/home/$USERNAME/isaac_ros-dev" >> ~/.bashrc
26-
echo "Installing Isaac Sim and Isaac Lab"
27-
$WORKSPACE_ROOT/.devcontainer/scripts/issaclab-pyenv.sh
28-
echo 'alias issacload="source ~/isaac_ros-dev/env_isaacsim/bin/activate"' >> ~/.bashrc
29-
fi
20+
pip install -r "$WORKSPACE_ROOT/requirements.txt"

0 commit comments

Comments
 (0)