Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
35780c3
add DCV SETUP
Tyronita Mar 22, 2026
1b71250
add claude code
Tyronita Mar 22, 2026
57a6510
fix claude code nvm path
Tyronita Mar 22, 2026
c9339fd
add our starter script
Tyronita Mar 22, 2026
082364c
Notes for scoring, task parameters, teleop and per policy observation…
Mar 22, 2026
57214bf
initial sim-to-sim setup scripts
Mar 22, 2026
1a4ec27
Merge branch 'main' into EVAN-add-AWS-dcv-with-claude-code-and-aic-setup
Mar 22, 2026
dfb04e3
working colcon build for ros2 and succesful gazebo launch
Mar 22, 2026
d85cfc7
scoring for gazebo/rviz passes
Mar 22, 2026
9eea06a
mujoco headless working
Mar 22, 2026
c3bc6c0
DODGY MUJOCO aws/setup_sim_environments.sh build changes for Converte…
Mar 22, 2026
d5a5ece
isaac sim random agent works
Mar 22, 2026
042df25
Build Tools and COncept Wiki
Tyronita Mar 22, 2026
b9c8644
split scripts and add wiki for concepts
Mar 22, 2026
17aeb22
Update install_devtools.sh - fix path for claude code
Tyronita Mar 23, 2026
a94d16f
Update install_devtools.sh
Tyronita Mar 23, 2026
13ef0f0
Update install_devtools.sh
Tyronita Mar 23, 2026
acd7b4c
Update install_devtools.sh
Tyronita Mar 23, 2026
76aeaee
fix paths
Mar 23, 2026
fd2da71
Create working_gazebo_setup.sh
Tyronita Mar 28, 2026
d22531a
Create wip_mujoco_integration.sh
Tyronita Mar 28, 2026
01c773a
Update wip_mujoco_integration.sh
Tyronita Mar 28, 2026
f483e97
Update wip_mujoco_integration.sh - got to sim - shi hao has ports wor…
Tyronita Mar 28, 2026
d7d865f
Add Cheat Code Command
Tyronita Apr 1, 2026
a812836
Add hf hub login
Tyronita Apr 1, 2026
ad43bdb
aws: per-trial rosbag recorder, CheatCode helpers, pixi bag deps in s…
Tyronita Apr 1, 2026
80640d7
Add rosbag to LeRobot v3 converter for ACT-style training (AIC).
Tyronita Apr 1, 2026
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# AWS security files
aws/*.pem

# MacOS Security Files
.DS_Store
.claude
Expand Down
546 changes: 546 additions & 0 deletions Liberty-Notes/Nvidia-Issac-Lab/March-22.ipynb

Large diffs are not rendered by default.

25 changes: 25 additions & 0 deletions aws/bag_record_per_trial.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env bash
# bag_record_per_trial.sh — One ros2 bag per InsertCable trial (wraps rosbag_per_trial.py)
#
# Usage (from host, AIC already in PATH via pixi):
# export AIC_WS=~/ws_aic/src/aic # or Project-Automaton/References/aic
# bash aws/bag_record_per_trial.sh ~/bags/my_session
#
# Prerequisites: sim + aic_engine running; policy (e.g. CheatCode) up; same Zenoh as usual.
set -eo pipefail

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
OUT="${1:?Usage: $0 <output-directory>}"

if [[ -n "${AIC_WS:-}" ]]; then
A="$AIC_WS"
elif [[ -d "$SCRIPT_DIR/../References/aic" ]]; then
A="$(cd "$SCRIPT_DIR/../References/aic" && pwd)"
else
A="$HOME/ws_aic/src/aic"
fi

[[ -d "$A" ]] || { echo "[ERROR] AIC workspace not found: $A (set AIC_WS)" >&2; exit 1; }

cd "$A"
exec pixi run python "$SCRIPT_DIR/rosbag_per_trial.py" --output-dir "$(mkdir -p "$OUT" && cd "$OUT" && pwd)"
95 changes: 95 additions & 0 deletions aws/cheatcode_record.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
#!/usr/bin/env bash
# cheatcode_record.sh — Start AIC eval with ground truth (CheatCode), optional ROS bag recording
#
# Matches the distrobox + CheatCode flow in working_gazebo_setup.sh, plus ros2 bag topics for imitation/offline use.
#
# Usage:
# bash aws/cheatcode_record.sh help # print all terminal commands (default)
# bash aws/cheatcode_record.sh policy # run CheatCode (requires sim already up)
# bash aws/cheatcode_record.sh record # record bag (requires sim + policy)
#
# Optional env:
# AIC_WS — pixi workspace root (default: References/aic in repo, else ~/ws_aic/src/aic)
# BAG_DIR — output directory for bags (default: ~/bags)

set -eo pipefail

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
REF_AIC="$REPO_ROOT/References/aic"
if [[ -n "${AIC_WS:-}" ]]; then
:
elif [[ -d "$REF_AIC" ]]; then
AIC_WS="$REF_AIC"
else
AIC_WS="$HOME/ws_aic/src/aic"
fi
BAG_DIR="${BAG_DIR:-$HOME/bags}"

print_help() {
cat <<EOF
CheatCode eval + ROS bag recording (three terminals)

=== Terminal 1 — eval container (Gazebo + stack, ground truth) ===
export DBX_CONTAINER_MANAGER=docker
distrobox enter -r aic_eval

Inside the container:
/entrypoint.sh ground_truth:=true start_aic_engine:=true

=== Terminal 2 — CheatCode policy ===
cd $AIC_WS
pixi run ros2 run aic_model aic_model --ros-args -p use_sim_time:=true -p policy:=aic_example_policies.ros.CheatCode

(If ROS discovery fails from the host, run Terminal 2 inside the same distrobox shell and use:
ros2 run aic_model aic_model --ros-args -p use_sim_time:=true -p policy:=aic_example_policies.ros.CheatCode )

=== Terminal 3 — record (ROS 2 bag) ===
cd $AIC_WS
pixi run ros2 bag record -o $BAG_DIR/cheatcode_run_\$(date +%Y%m%d_%H%M%S) /observations /aic_controller/pose_commands /joint_states

Sanity check (optional):
pixi run ros2 topic list | grep -E 'observations|pose_commands|joint_states'

Note: This produces a ROS bag, not a Hugging Face LeRobot dataset. For ACT/LeRobot format use lerobot-record + teleop (see References/aic/aic_utils/lerobot_robot_aic/README.md).

One bag per InsertCable trial (manifest + trial_NNNN_* dirs):
bash $SCRIPT_DIR/bag_record_per_trial.sh ~/bags/my_session

Runnable shortcuts from repo (with AIC_WS=$AIC_WS):
bash aws/cheatcode_record.sh policy
bash aws/cheatcode_record.sh record
EOF
}

run_policy() {
[[ -d "$AIC_WS" ]] || {
echo "[ERROR] AIC workspace not found: $AIC_WS" >&2
echo "Set AIC_WS or clone aic to ~/ws_aic/src/aic (see working_gazebo_setup.sh)." >&2
exit 1
}
cd "$AIC_WS"
exec pixi run ros2 run aic_model aic_model --ros-args -p use_sim_time:=true -p policy:=aic_example_policies.ros.CheatCode
}

run_record() {
[[ -d "$AIC_WS" ]] || {
echo "[ERROR] AIC workspace not found: $AIC_WS" >&2
exit 1
}
mkdir -p "$BAG_DIR"
local out="$BAG_DIR/cheatcode_run_$(date +%Y%m%d_%H%M%S)"
cd "$AIC_WS"
exec pixi run ros2 bag record -o "$out" /observations /aic_controller/pose_commands /joint_states
}

case "${1:-help}" in
help|-h|--help) print_help ;;
policy|cheatcode) run_policy ;;
record|bag) run_record ;;
*)
echo "Unknown command: $1" >&2
print_help >&2
exit 1
;;
esac
39 changes: 39 additions & 0 deletions aws/convert_rosbags_to_lerobot.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/usr/bin/env bash
# convert_rosbags_to_lerobot.sh — Session of per-trial ros2 bags → LeRobot v3 (ACT layout)
#
# Usage:
# bash aws/convert_rosbags_to_lerobot.sh <session-dir> <output-dataset-dir> [--extra-args...]
#
# Example:
# bash aws/convert_rosbags_to_lerobot.sh ~/bags/run1 ~/datasets/aic_act --repo-id local/aic_run1
#
# Requires: AIC pixi env with lerobot + rosbag2_py (see aws/install_sim.sh).
set -eo pipefail

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
SESSION="${1:?Usage: $0 <session-dir> <output-dataset-dir> [-- args for rosbag_to_lerobot_aic.py]}"
OUTPUT="${2:?Usage: $0 <session-dir> <output-dataset-dir> [-- args...]}"
shift 2

if [[ -n "${AIC_WS:-}" ]]; then
A="$AIC_WS"
elif [[ -d "$SCRIPT_DIR/../References/aic" ]]; then
A="$(cd "$SCRIPT_DIR/../References/aic" && pwd)"
else
A="$HOME/ws_aic/src/aic"
fi

[[ -d "$A" ]] || { echo "[ERROR] AIC workspace not found: $A (set AIC_WS)" >&2; exit 1; }
[[ -d "$SESSION" ]] || { echo "[ERROR] Session directory not found: $SESSION" >&2; exit 1; }

SESSION_ABS="$(cd "$SESSION" && pwd)"
OUT_PARENT="$(dirname "$OUTPUT")"
OUT_LEAF="$(basename "$OUTPUT")"
mkdir -p "$OUT_PARENT"
OUTPUT_ABS="$(cd "$OUT_PARENT" && pwd)/$OUT_LEAF"

cd "$A"
exec pixi run python "$SCRIPT_DIR/rosbag_to_lerobot_aic.py" \
--session-dir "$SESSION_ABS" \
--output-dir "$OUTPUT_ABS" \
"$@"
26 changes: 26 additions & 0 deletions aws/install_dcv.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env bash
# install_dcv.sh — Install NICE DCV remote desktop on Ubuntu 24.04
set -eo pipefail

echo "=== Installing Ubuntu Desktop ==="
sudo apt-get update -qq
sudo apt-get install -y ubuntu-desktop

echo "=== Installing NICE DCV ==="
cd /tmp
ARCH=$(dpkg --print-architecture)
# Use ubuntu2404 for Noble; fall back to ubuntu2204
DCV_URL="https://d1uj6qtbmh3dt5.cloudfront.net/nice-dcv-ubuntu2404-${ARCH}.tgz"
wget -q "$DCV_URL" -O nice-dcv.tgz 2>/dev/null \
|| wget -q "https://d1uj6qtbmh3dt5.cloudfront.net/nice-dcv-ubuntu2204-${ARCH}.tgz" -O nice-dcv.tgz
tar -xzf nice-dcv.tgz
cd nice-dcv-*/
sudo apt-get install -y ./nice-dcv-server_*.deb ./nice-dcv-web-viewer_*.deb

echo "=== Starting DCV ==="
sudo systemctl enable --now dcvserver

echo "=== Set the ubuntu user password (required for DCV login) ==="
sudo passwd ubuntu

echo "DCV installed. Connect via https://<instance-ip>:8443"
58 changes: 58 additions & 0 deletions aws/install_devtools.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#!/usr/bin/env bash
# install_devtools.sh — Install dev tools (Node via NVM, Claude Code)

set -eo pipefail

echo "=== Installing prerequisites ==="
sudo apt-get update -qq
sudo apt-get install -y curl ca-certificates build-essential

# Install NVM
if [ ! -d "$HOME/.nvm" ]; then
echo "=== Installing NVM ==="
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
fi

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"

# Install Node
echo "=== Installing Node.js (LTS) ==="
nvm install --lts
nvm use --lts
nvm alias default 'lts/*'

# Install Claude
echo "=== Installing Claude Code ==="
npm install -g @anthropic-ai/claude-code

# Persist NVM
if ! grep -q 'NVM_DIR' "$HOME/.bashrc"; then
echo "=== Updating ~/.bashrc ==="
cat << 'EOF' >> "$HOME/.bashrc"

# NVM setup
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
EOF
fi

# add hf hub login
echo "=== Done ==="
echo "Run: source ~/.bashrc"
echo "Then: claude"

echo "=== Hugging Face CLI (pipx) ==="
pipx ensurepath
export PATH="$HOME/.local/bin:$PATH"
if ! command -v hf &>/dev/null; then
pipx install "huggingface_hub[cli]"
fi
export PATH="$HOME/.local/bin:$PATH"
grep -q '.local/bin' "$SHELL_RC" 2>/dev/null \
|| echo 'export PATH="$HOME/.local/bin:$PATH"' >> "$SHELL_RC"
echo ""
echo " Hugging Face: open a new shell (or: source ~/.bashrc), then run once:"
echo " hf auth login"
echo " Non-interactive / CI: export HF_TOKEN=hf_..."
echo ""
Loading