Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions misc/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ branch=""
needsReboot=false
calFile=""

cd ..
dirPath="$(pwd)"
dirName="$(basename `pwd`)"
export dirPath="$(catkin locate)"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to be exported to the environment?

Suggested change
export dirPath="$(catkin locate)"
dirPath="$(catkin locate)"

if [ -z "$dirPath" ]; then dirPath=$(dirname "$0"); fi
dirName="$(basename $dirPath)"

#Functions
#--------------------------------------------------------------------------
Expand Down
4 changes: 3 additions & 1 deletion misc/rover_launch_local.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash
export SWARMATHON_APP_ROOT="$(catkin locate)"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Suggested change
export SWARMATHON_APP_ROOT="$(catkin locate)"
SWARMATHON_APP_ROOT="$(catkin locate)"

if [ -z "$SWARMATHON_APP_ROOT" ]; then SWARMATHON_APP_ROOT=$(dirname "$0"); fi
roscore &
./rover_onboard_node_launch.sh localhost $1
$SWARMATHON_APP_ROOT/misc/rover_onboard_node_launch.sh localhost $1
15 changes: 8 additions & 7 deletions run.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
#!/bin/bash
echo "Running in $PWD"
previous_gazebo_model_path=${GAZEBO_MODEL_PATH}
previous_gazebo_plugin_path=${GAZEBO_PLUGIN_PATH}
export SWARMATHON_APP_ROOT="$PWD"
export GAZEBO_MODEL_PATH="$PWD/simulation/models"
export GAZEBO_PLUGIN_PATH="$PWD/build/gazebo_plugins"
source "$PWD/devel/setup.bash"
export SWARMATHON_APP_ROOT="$(catkin locate)"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Suggested change
export SWARMATHON_APP_ROOT="$(catkin locate)"
SWARMATHON_APP_ROOT="$(catkin locate)"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Carter90 awesome that you're working on this!

if [ -z "$SWARMATHON_APP_ROOT" ]; then SWARMATHON_APP_ROOT=$(dirname "$0"); fi
echo "Running from: $PWD with repo root: $SWARMATHON_APP_ROOT"
export GAZEBO_MODEL_PATH="$SWARMATHON_APP_ROOT/simulation/models"
export GAZEBO_PLUGIN_PATH="$SWARMATHON_APP_ROOT/build/gazebo_plugins"
source "$SWARMATHON_APP_ROOT/devel/setup.bash"
echo Cleaning up ROS and Gazebo Processes

#Delete the rqt cache - can take 24 hours for changes in the UI
# to show up otherwise
rm ~/.config/ros.org/rqt_gui.ini

./cleanup.sh
$SWARMATHON_APP_ROOT/cleanup.sh
echo Killing rosmaster
pkill rosmaster
echo Killing roscore
Expand All @@ -28,7 +29,7 @@ echo Killing rosmaster
pkill rosmaster
echo Killing roscore
pkill roscore
./cleanup.sh
$SWARMATHON_APP_ROOT/cleanup.sh
# Restore previous environment
export GAZEBO_MODEL_PATH=$previous_gazebo_model_path
export GAZEBO_PLUGIN_PATH=$previous_gazebo_plugin_path