-
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.
Change to acados with new features, add MKL Pardiso Add more solver parameters (tolerances, osqp linsys solver) and outputs (optimal objective, residuals) add devcontainer file Fix MKL setup on arm exclude MKL pardiso for ARM experiments hotfix experiments hotfix in solver experiments script update gitignore add automatic experiemnt scri[t readd exps fix fix add more presets add default max iter Hotfix mkl setup script disable OSQP polish change preset add solver tolerances to WBC hf wbc preset solver selection Update README and Plotting
- Loading branch information
1 parent
fa88544
commit 93b9680
Showing
19 changed files
with
869 additions
and
416 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{ | ||
"name": "dfki-quad Devcontainer", | ||
"privileged": true, | ||
"build": { | ||
"dockerfile": "${localWorkspaceFolder}/docker/Dockerfile", | ||
"args": { | ||
"HW_ARCH":"x86_64", | ||
"GO2_NETWORK_INTERFACE":"enp0s31f6" | ||
} | ||
}, | ||
"workspaceFolder": "/root/ros2_ws", | ||
"workspaceMount": "source=${localWorkspaceFolder}/ws/src,target=/root/ros2_ws/src,type=bind", | ||
"customizations": { | ||
"vscode": { | ||
"extensions":[ | ||
"ms-vscode.cpptools", | ||
"ms-vscode.cpptools-themes", | ||
"ms-vscode.cpptools-extension-pack", | ||
"twxs.cmake", | ||
"donjayamanne.python-extension-pack", | ||
"eamodio.gitlens", | ||
"ms-iot.vscode-ros", | ||
"xaver.clang-format", | ||
"ms-vscode.cmake-tools", | ||
"dotjoshjohnson.xml" | ||
] | ||
} | ||
}, | ||
"containerEnv": { | ||
"DISPLAY": "unix:0", | ||
"ROS_AUTOMATIC_DISCOVERY_RANGE": "LOCALHOST", | ||
"ROS_DOMAIN_ID": "42" | ||
}, | ||
"runArgs": [ | ||
"--net=host", | ||
"--pid=host", | ||
"--ipc=host", | ||
"-e", "DISPLAY=${env:DISPLAY}", | ||
"--env=QT_X11_NO_MITSHM=1", | ||
"--device=/dev:/dev", | ||
"--device=/dev/input:/dev/input", | ||
"--device=/dev/ttyACM0:/dev/ttyACM0" | ||
], | ||
"mounts": [ | ||
"source=/tmp/.X11-unix,target=/tmp/.X11-unix,type=bind,consistency=cached", | ||
"source=/dev/dri,target=/dev/dri,type=bind,consistency=cached", | ||
"source=${localWorkspaceFolder}/ws/.clang-format,target=/root/ros2_ws/.clang-format,type=bind" | ||
], | ||
"postCreateCommand": "cbg" | ||
} |
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 | ||
|
||
# Check if at least one branch and corresponding number is provided | ||
echo "Usage: $0 <platform_name> <test_preset> <ros_domain_id> <branch1> <number1> <branch2> <number2> ..." | ||
|
||
|
||
platform_name="$1" | ||
test_preset="$2" | ||
domain_id="$3" | ||
shift 3 | ||
# Process arguments as pairs (branch, number) | ||
while [ "$#" -gt 0 ]; do | ||
branch="$1" | ||
number="$2" | ||
shift 2 # Shift past the current branch and number | ||
|
||
echo "Switching to branch: $branch" | ||
|
||
# Ensure we are in a git repository | ||
if ! git rev-parse --is-inside-work-tree > /dev/null 2>&1; then | ||
echo "Error: This script must be run inside a Git repository." | ||
exit 1 | ||
fi | ||
|
||
# Fetch latest changes and switch to the branch | ||
git fetch origin | ||
if ! git checkout "$branch"; then | ||
echo "Error: Could not switch to branch $branch" | ||
exit 1 | ||
fi | ||
|
||
echo "Starting Docker container..." | ||
|
||
docker_options=(-t \ | ||
--label="dfki_quad" \ | ||
--net="host" \ | ||
--env="DISPLAY" \ | ||
--env="QT_X11_NO_MITSHM=1" \ | ||
--volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \ | ||
--volume="${PWD}/ws/src:/root/ros2_ws/src" \ | ||
--volume="/home/$USER/.ros_docker_bash_history:/root/.bash_history" \ | ||
--device="/dev/input:/dev/input" \ | ||
--device="/dev/ttyACM0:/dev/ttyACM0" \ | ||
--privileged) | ||
|
||
# when on arm, try to mount the external ssd for data logging | ||
if [[ $(uname -i) = "aarch64" ]]; then | ||
docker_options+=(--mount type=bind,src=/media/external-drive,dst=/media/external-drive) | ||
docker_options+=(--mount type=bind,src=/usr/bin/tegrastats,dst=/usr/bin/tegrastats) | ||
elif [[ $(uname -i ) = "x86_64" ]]; then | ||
docker_options+=(--mount type=bind,source=/sys/class/powercap,target=/sys/class/powercap) | ||
fi | ||
|
||
# check, if a container with dfki_quad label is already there | ||
container_id=$(docker ps -aq --filter "label=dfki_quad") | ||
xhost +local: | ||
mkdir ${PWD}/ws/src/solver_experiments/results | ||
docker run "${docker_options[@]}" dfki_quad:latest /bin/bash -ci "cbg_onboard && sr && export ROS_DOMAIN_ID=$domain_id && ros2 run solver_experiments solver_experiments --ros-args -p mpc_prediction_horizon:="$number" -p test_preset:="$test_preset"" | ||
|
||
# Check if the container started successfully | ||
if [ $? -ne 0 ]; then | ||
echo "Error: Docker container failed to run." | ||
exit 1 | ||
fi | ||
|
||
echo "Stopping container..." | ||
docker stop $(docker ps -q -f ancestor=dfki_quad:latest) | ||
|
||
echo "moving data" | ||
mv ${PWD}/ws/src/solver_experiments/results ${PWD}/ws/src/solver_experiments/${platform_name}-N${number}-${test_preset}_$(date '+%Y%m%d_%H%M') | ||
|
||
echo "Experiment on branch $branch with horizon $number completed." | ||
done | ||
|
||
echo "All experiments finished!" |
Oops, something went wrong.