Skip to content

Instantly share code, notes, and snippets.

View adeeb10abbas's full-sized avatar
🎯
Focusing

ali adeeb10abbas

🎯
Focusing
View GitHub Profile
# Reference: https://diffusion-policy.cs.columbia.edu/data/experiments/image/tool_hang_ph/diffusion_policy_cnn/config.yaml
_target_: diffusion_policy.workspace.train_diffusion_unet_image_workspace.TrainDiffusionUnetImageWorkspace
name: train_diffusion_unet_hybrid
exp_name: diffusion_ddim
task_name: ${task.name}
action_dim: 24
horizon: 16
n_obs_steps: 2
dataset_obs_steps: ${n_obs_steps}
n_action_steps: 8
@adeeb10abbas
adeeb10abbas / time_sync_ros_avatar.py
Last active June 10, 2024 14:05
for use with avatar
import rosbag
import rospy
from sensor_msgs.msg import Image, JointState
from geometry_msgs.msg import PoseStamped
from message_filters import ApproximateTimeSynchronizer, Subscriber
from avatar_msgs.msg import PTIPacket
from rdda_interface.msg import RDDAPacket
from time import time
def callback(image_left, image_right, image_table, right_smarty_arm, left_smarty_arm, right_glove=None, left_glove=None):
@adeeb10abbas
adeeb10abbas / vis.py
Last active October 21, 2023 00:10
visualize via drake
import numpy as np
import os
from pydrake.geometry import (
StartMeshcat,
)
from pydrake.visualization import ModelVisualizer
meshcat = StartMeshcat()
"""
This script reads data from a CSV file containing columns for wheel commands and error values.
It first aggregates the data to average error values associated with duplicate wheel command pairs.
The script then produces three heatmaps:
1. A combined heatmap of both 'error ang gp' and 'error ang kin'.
2. An individual heatmap for 'error ang gp'.
3. An individual heatmap for 'error ang kin'.
All heatmaps use the same color scale ranging from 0 to 0.5, making the visual representation directly comparable.
@adeeb10abbas
adeeb10abbas / docker_ros2.md
Created July 9, 2023 22:23
gpt4 generated answer

To enable ROS2 communication between the host machine and Docker containers, you need to set up the environment correctly. Here's a step-by-step guide:

  1. Install Docker on your host machine: If you haven't installed Docker yet, you can download and install it from the Docker's official website.

  2. Pull or build a Docker image with ROS2 installed: You can either pull an existing ROS2 Docker image from DockerHub or build your own image.

    For example, to pull the latest ROS2 image, use this command:

docker pull osrf/ros:foxy

@adeeb10abbas
adeeb10abbas / ROS2DebugVSCode.md
Created May 30, 2023 20:13 — forked from JADC362/ROS2DebugVSCode.md
Debug ROS2 C++ node on VSCode (Ubuntu)

Debug ROS2 C++ node on VSCode (Ubuntu)

Description

This is a small tutorial on how to debug a ROS2 C++ node usign VSCode.

Requeriments

This implementation was done using:

import time
import psutil
import json
import paho.mqtt.client as mqtt
def on_connect(client, userdata, flags, rc):
print(f'Connected: {rc}')
sudo apt update
sudo apt upgrade
sudo apt install libpcl-dev
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install ros-melodic-pcl-conversions
sudo apt-get install ros-melodic-pcl-ros
catkin_make_isolated
@adeeb10abbas
adeeb10abbas / shure.sh
Created April 3, 2023 17:18
Pipewire hack to get my shure mv7 mic to work
sudo add-apt-repository ppa:pipewire-debian/pipewire-upstream
# Update
sudo apt update
# Install components
sudo apt install gstreamer1.0-pipewire pipewire-media-session libspa-0.2-bluetooth libspa-0.2-jack pipewire pipewire-audio-client-libraries
# If you get unmet dependencies, you can run:
sudo apt --fix-broken install
opts = spreadsheetImportOptions("NumVariables", 1);
% Specify sheet and range
opts.Sheet = "Sheet1";
opts.DataRange = "A1:A110";
% Specify column names and types
opts.VariableNames = "VarName1";
opts.SelectedVariableNames = "VarName1";
opts.VariableTypes = "double";