Skip to content

Commit

Permalink
Try fix setup scripts for ROS workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
sea-bass committed Jun 28, 2024
1 parent e82b536 commit ffeb8ca
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
8 changes: 8 additions & 0 deletions setup/create_python_env.bash
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ pip3 install -r test/python_test_requirements.txt
popd > /dev/null || exit
deactivate

# If setting up with ROS, install extra packages
ROS_ARG=$1
if [ "${ROS_ARG}" == "ros"]
then
echo "Installing additional packages for ROS setup"
pip3 install colcon_common_extensions
fi

# Print confirmation and instructions at the end
echo -e "
Expand Down
10 changes: 5 additions & 5 deletions setup/source_pyrobosim.bash
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,17 @@

# User variables -- change this to meet your needs
export VIRTUALENV_FOLDER=~/python-virtualenvs/pyrobosim
export PYROBOSIM_WS=~/pyrobosim_ws
export PYROBOSIM_WS=~/workspace/pyrobosim_ws

if [ -n "${VIRTUAL_ENV}" ]
then
deactivate
fi

# Activate the Python virtual environment
echo "Activated virtual environment at ${VIRTUALENV_FOLDER}."
source ${VIRTUALENV_FOLDER}/bin/activate

# Parse ROS distro argument
ROS_DISTRO=$1
if [ "${ROS_DISTRO}" == "" ]
Expand All @@ -51,10 +55,6 @@ else
popd > /dev/null || exit
fi

# Activate the Python virtual environment
echo "Activated virtual environment at ${VIRTUALENV_FOLDER}."
source ${VIRTUALENV_FOLDER}/bin/activate

# Add dependencies to path
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
PDDLSTREAM_PATH=${SCRIPT_DIR}/../dependencies/pddlstream
Expand Down

0 comments on commit ffeb8ca

Please sign in to comment.