Skip to content

Commit

Permalink
Fix ros_interface.py constructor docstring and clean up scripts (#174)
Browse files Browse the repository at this point in the history
  • Loading branch information
sea-bass authored May 8, 2024
1 parent fb9dfa2 commit b6efd2c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
8 changes: 4 additions & 4 deletions pyrobosim_ros/pyrobosim_ros/ros_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ def __init__(
Creates a ROS 2 world wrapper node.
This node will:
* Subscribe to single actions on the ``commanded_action`` topic.
* Subscribe to task plans on the ``commanded_plan`` topic.
* Subscribe to robot velocity commands on the ``robot_name/cmd_vel`` topic.
* Publish robot states on the ``robot_name/robot_state`` topic.
* Publish states for each robot on ``<robot_name>/robot_state`` topics.
* Subscribe to velocity commands for each robot on ``<robot_name>/cmd_vel`` topics.
* Serve a ``request_world_state`` service to retrieve the world state for planning.
* Serve a ``execute_action`` action server to run single actions on a robot.
* Serve a ``execute_task_plan`` action server to run entire task plans on a robot.
:param world: World model instance.
:type world: :class:`pyrobosim.core.world.World`
Expand Down
1 change: 0 additions & 1 deletion setup/create_python_env.bash
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ source "${VIRTUALENV_FOLDER}/bin/activate"
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
pushd "${SCRIPT_DIR}/.." > /dev/null || exit
python3 -m pip install --upgrade pip
# Install catkin-pkg because https://github.com/colcon/colcon-ros/issues/118
pip3 install ./pyrobosim
pip3 install -r test/python_test_requirements.txt
popd > /dev/null || exit
Expand Down
2 changes: 1 addition & 1 deletion setup/generate_docs.bash
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# pip3 install -r docs/python_docs_requirements.txt

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
source "${SCRIPT_DIR}/source_pyrobosim.bash"
source "${SCRIPT_DIR}/source_pyrobosim.bash ${ROS_DISTRO}"
pushd "${SCRIPT_DIR}/../docs" > /dev/null || exit
rm -rf build/
rm -rf source/generated
Expand Down
9 changes: 6 additions & 3 deletions setup/source_pyrobosim.bash
Original file line number Diff line number Diff line change
Expand Up @@ -38,25 +38,28 @@ if [ "${ROS_DISTRO}" == "" ]
then
echo "Setting up pyrobosim with no ROS distro."
else
echo "Setting up pyrobosim with ROS ${ROS_DISTRO}"
echo "Setting up pyrobosim with ROS ${ROS_DISTRO}."
source /opt/ros/${ROS_DISTRO}/setup.bash
pushd "${PYROBOSIM_WS}" > /dev/null || exit
if [ ! -d "build" ]
then
echo "Building colcon workspace..."
echo "Building ROS workspace at ${PYROBOSIM_WS}..."
colcon build
fi
. install/local_setup.bash
echo "Sourcing ROS workspace at ${PYROBOSIM_WS}."
source install/local_setup.bash
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
if [ -d "${PDDLSTREAM_PATH}" ]
then
echo "Added PDDLStream to Python path."
export PYTHONPATH=${PDDLSTREAM_PATH}:$PYTHONPATH
fi

0 comments on commit b6efd2c

Please sign in to comment.