forked from esa-prl/ExoMy
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request esa-prl#8 from esa-prl/dev
* Fixed a bug that caused the motors to only stop delayed. * New shell scripts make starting and configuring of docker containers easier. * Minor refactoring * Minor web-GUI improvements * Add enable disable funcationality to motors. * Add "motors" button to enable and disable motors. * Changed the button allocation on the gamepad: * Y - Crabbing * X - Spot turn * A - Ackerman * Start - Enable Motors
- Loading branch information
Showing
16 changed files
with
351 additions
and
299 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
#!/bin/bash | ||
# run_exomy- A script to run containers for dedicated functions of exomy | ||
|
||
help_text="Usage: "$0" [MODE] [OPTIONS] | ||
A script to run ExoMy in different configurations | ||
Options: | ||
-a, --autostart Toggles autostart mode on or off | ||
-c, --config Runs the motor configuration of ExoMy | ||
-d, --devel Runs the development mode to change some code of ExoMy | ||
-h, --help Shows this text | ||
" | ||
|
||
### Main | ||
# Initialize parameters | ||
container_name="exomy" | ||
image_name="exomy" | ||
|
||
# Process parameters | ||
if [ "$1" != "" ]; then | ||
case $1 in | ||
-a | --autostart) | ||
container_name="${container_name}_autostart" | ||
start_command="autostart" | ||
options="--restart always" | ||
|
||
;; | ||
-s | --stop_autostart) | ||
docker container stop "${container_name}_autostart" | ||
exit | ||
;; | ||
-c | --config) | ||
container_name="${container_name}_config" | ||
start_command="config" | ||
options="--rm" | ||
;; | ||
-d | --devel) | ||
container_name="${container_name}_devel" | ||
start_command="devel" | ||
options="--restart always" | ||
;; | ||
-h | --help ) echo "$help_text" | ||
exit | ||
;; | ||
* ) echo "ERROR: Not a valid mode!" | ||
echo "$help_text" | ||
exit 1 | ||
esac | ||
else | ||
echo "ERROR: You need to specify a mode!" | ||
echo "$help_text" | ||
exit | ||
fi | ||
|
||
# Build docker image from Dockerfile in directory | ||
directory=$( dirname "$0" ) | ||
docker build -t $image_name $directory | ||
|
||
# Stop any of the 3 containers if running | ||
RUNNING_CONTAINERS=$( docker container ls -a -q --filter ancestor=exomy ) | ||
if [ -n "$RUNNING_CONTAINERS" ]; then | ||
docker rm -f "$RUNNING_CONTAINERS" | ||
fi | ||
|
||
# Run docker container | ||
docker run \ | ||
-it \ | ||
-v ~/ExoMy_Software:/root/exomy_ws/src/exomy \ | ||
-p 8000:8000 \ | ||
-p 8080:8080 \ | ||
-p 9090:9090 \ | ||
--privileged \ | ||
${options} \ | ||
--name "${container_name}" \ | ||
"${image_name}" \ | ||
"${start_command}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
bool connected | ||
bool motors_enabled | ||
int64 locomotion_mode | ||
int64 vel | ||
int64 steering |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?xml version="1.0"?> | ||
<package format="2"> | ||
<name>exomy</name> | ||
<version>1.0.0</version> | ||
<version>1.0.1</version> | ||
<description>The ExoMy ROS package</description> | ||
|
||
<maintainer email="[email protected]">Maximilian Ehrhardt</maintainer> | ||
|
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.