Skip to content

Commit 6fc9949

Browse files
committed
Add rosbag alias
Signed-off-by: Amro <amro@picklerobot.com>
1 parent 4df4940 commit 6fc9949

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

stow/zsh/.config/.pickle.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,18 @@ function kr70fk() {
163163
docker exec -it dill_devcontainer python -c "from app.arm.kuka.kinematics.kinematics import make_kr70_kin; kin = make_kr70_kin(None); print(kin.forward(${q}))"
164164
}
165165

166+
167+
# `rosbag` function run through rosbridge
168+
function rbag() {
169+
bag_path=""
170+
if [ "$#" -ge 2 ]; then
171+
host_path=$(realpath "${2}" --relative-to="${HOME}/pickle_data_v1")
172+
bag_path="/app/${host_path}"
173+
fi
174+
175+
docker run -it --rm --network=host -v ${HOME}/pickle_data_v1:/app rosbridge:latest bash -c "rosbag $1 ${bag_path} ${@:3}"
176+
}
177+
166178
#######################################
167179
# Dev container setup
168180
#######################################

0 commit comments

Comments
 (0)