Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
494182b
Set a strict timeout for tests
apockill Dec 6, 2024
0c263c1
Add cyclonedds to system but don't set it as the default
apockill Dec 6, 2024
82d0d63
Update template
apockill Dec 6, 2024
0e4d8cd
Update template
apockill Dec 6, 2024
689f6a8
Add URDF docs
apockill Dec 6, 2024
6a3a6fa
Update URDFs docs
apockill Dec 6, 2024
a583867
Add forklift URDF
apockill Dec 6, 2024
1dd58df
Add urdf dependencies
apockill Dec 6, 2024
326bb82
Add urdf tests
apockill Dec 6, 2024
776f36e
Add urdf module fixture
apockill Dec 6, 2024
5cb5121
Add `URDFModuleNodeFactory`
apockill Dec 6, 2024
5e64a15
Migrate URDFConstants
apockill Dec 6, 2024
aed183d
Prevent a circular dependency
apockill Dec 7, 2024
7bfdd1e
Merge remote-tracking branch 'origin/main' into feature/urdf_helpers
apockill Dec 7, 2024
d8d4af5
Add mimic tag
apockill Dec 8, 2024
261a0c1
Fix lint
apockill Dec 8, 2024
e72f23e
Update cruft
apockill Dec 8, 2024
6f50797
Remove unnecessary `echo`
apockill Dec 8, 2024
5b84222
Have node_helpers more closely follow the template
apockill Dec 8, 2024
2c882a8
Lint fixes
apockill Dec 8, 2024
aec79e7
Fix tests
apockill Dec 9, 2024
319d41d
Update template
apockill Dec 9, 2024
bc2fabd
Merge remote-tracking branch 'origin/main' into feature/support-urdf-…
apockill Dec 9, 2024
612ed60
Fix bug with `mimic` joint namespacing implementation
apockill Dec 9, 2024
a41f3d2
Lint
apockill Dec 9, 2024
eabd129
Merge remote-tracking branch 'origin/main' into feature/support-urdf-…
apockill Dec 9, 2024
244ec9d
Merge remote-tracking branch 'origin/main' into feature/support-urdf-…
apockill Dec 12, 2024
2b62189
Add template changes
apockill Dec 12, 2024
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
2 changes: 1 addition & 1 deletion .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "https://github.com/UrbanMachine/create-ros-app.git",
"commit": "3d4731e5661e8cbac11d71c60c8e925a989c150c",
"commit": "93e541631403e2c2c091c65d6583d61bd85a472c",
"checkout": null,
"context": {
"cookiecutter": {
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ services:
DISPLAY: $DISPLAY
# Necessary for PulseAudio passthrough
PULSE_SERVER: "unix:/pulse-socket"
# Enable serial passthrough
privileged: true
# Gives the container access to kernel capabilities, useful for most robots
network_mode: host
cap_add:
Expand Down
23 changes: 23 additions & 0 deletions docker/_shared.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,27 @@ function deploy_and_wait {
done
echo "Another process brought down the stack." >&2
return 1
}

# Shows the user the available launch profiles
function launch_profiles_helper_msg {
echo "Available launch profiles are:" >&2
# shellcheck disable=SC2012
ls -1 launch-profiles/ | sed 's/^/ - /' >&2
echo "" >&2
echo "Read more about 'launch-profiles' under 'docs/about_template.md'" >&2
exit 1
}

# Inform the user that the chosen launch profile is invalid if it is not a directory
function validate_launch_profile {
local chosen_profile
chosen_profile="$1"

# Check if the chosen profile is a directory under 'launch-profiles'
if [[ ! -d "launch-profiles/${chosen_profile}" ]]; then
echo "Error: '${chosen_profile}' is not a valid launch profile." >&2
echo "It should be a directory under 'launch-profiles/'." >&2
launch_profiles_helper_msg
fi
}
13 changes: 4 additions & 9 deletions docker/launch
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,11 @@ set -o errexit
set -o pipefail
set -o nounset

source docker/_shared.sh

function usage {
echo "Usage: docker/launch [--no-pull] <launch-profile>" >&2
echo "Available launch profiles are:" >&2
# shellcheck disable=SC2012
ls -1 launch-profiles/ | sed 's/^/ - /' >&2
echo "" >&2
echo "Read more about 'launch-profiles' under 'docs/about_template.md'" >&2
exit 1
launch_profiles_helper_msg
}

function main {
Expand Down Expand Up @@ -64,9 +61,7 @@ function main {
echo "Missing <launch_profile> argument, specify a directory under 'launch-profiles/'" >&2
usage
fi

source docker/_shared.sh

validate_launch_profile "${launch_profile}"

# To reduce downtime, build the latest images before stopping any existing stacks.
if [[ "${pull_upstream_images}" = true ]]; then
Expand Down
37 changes: 37 additions & 0 deletions docker/reload-ros-nodes
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/usr/bin/env bash

# Builds and re-runs the ROS nodes container. This is useful if you want to restart
# the container over and over, oftentimes when developing on you ROS code.
# The container is only re-run if the image has changed.
#
# Usage:
# docker/reload-ros-nodes <launch-profile>
#
# Examples:
# docker/reload-ros-nodes node_helpers_showcase

set -o errexit
set -o pipefail
set -o nounset

source docker/_shared.sh

function main {
local launch_profile
launch_profile="${1:-}"

if [[ -z "${launch_profile}" ]]; then
echo "Missing <launch_profile> argument, specify a directory under 'launch-profiles/'" >&2
echo "Usage: docker/reload-ros-nodes <launch-profile>" >&2
launch_profiles_helper_msg
fi
validate_launch_profile "${launch_profile}"

build_images # Build any images that need to be built
enable_display_passthrough # Enable passthrough for the stack

export LAUNCH_PROFILE="${launch_profile}"
docker compose up -d --force-recreate ros-nodes
}

main "${@}"
3 changes: 3 additions & 0 deletions docs/about_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ Here's a quick guide on the features of this template

# Enter a currently running ROS container to poke around
docker/exec

# Rebuild and restart the ROS nodes in the container, useful for fast development
docker/reload-ros-nodes
```

More usage examples for the above scripts are documented at the top of the script files.
Expand Down