# Install VirtualGL
wget https://nav.dl.sourceforge.net/project/virtualgl/3.1/virtualgl_3.1_amd64.deb
sudo apt install ./virtualgl_3.1_amd64.deb
# Install TurboVNC
This file contains hidden or 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
from lerobot.common.datasets.lerobot_dataset import LeRobotDataset | |
from lerobot.configs.train import TrainPipelineConfig | |
from lerobot.configs.default import DatasetConfig | |
from lerobot.common.policies.diffusion.configuration_diffusion import DiffusionConfig | |
import numpy as np | |
import os | |
from pathlib import Path | |
def main(): |
This file contains hidden or 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
import geometry_msgs.msg | |
import transforms3d as t3d | |
import numpy as np | |
def ros2numpy(pose): | |
xyz = None | |
q = None | |
if isinstance(pose, geometry_msgs.msg.PoseStamped): |
This file contains hidden or 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
# AprilTag Plane -> XformFix: 180,0,0 | |
import omni | |
from pxr import Usd, UsdGeom, Gf | |
import numpy as np | |
import transforms3d as t3d | |
def print_xyzq(tf): | |
q = t3d.quaternions.mat2quat(tf[:3,:3]) |
This file contains hidden or 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
# Installation: | |
# | |
# pip3 install bpy | |
# | |
# Usage: | |
# | |
# python3 decimate.py /path/to/meshes/* --ratio 0.025 | |
# | |
import bpy |
This file contains hidden or 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
# Converts rotation and translation VRML fields. | |
# It takes the clipboard content, applies transforms, and pastes the transformed VRML to the clipboard. | |
# | |
# Dependencies: | |
# | |
# pip3 install clipboard numpy transforms3d | |
# sudo apt install xclip | |
# | |
# GNOME SHORTCUT | |
# In GNOME, you can run the script as a keyboard shortcut. |
This file contains hidden or 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
all: | |
g++ -shared -fPIC MyPlugin.cpp -o myplugin.so | |
g++ main.cpp -o main -ldl |
This file contains hidden or 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
import gym | |
import numpy as np | |
import torch | |
import torch.nn | |
from torch.nn.functional import smooth_l1_loss, relu, softmax | |
class ActorCriticNet(torch.nn.Module): | |
def __init__(self, n_states=4, n_hidden=128, n_actions=2): | |
super().__init__() |
This file contains hidden or 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
#include <Python.h> | |
typedef struct { | |
PyObject_HEAD char *arr; | |
int len; | |
} ArrayCuckoo; | |
static int ArrayCuckoo_init(ArrayCuckoo *self, PyObject *args, PyObject *kwds) { | |
self->len = 2; | |
self->arr = (char *)malloc(self->len * sizeof(char)); |
This file contains hidden or 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
{ | |
"configurations": [ | |
{ | |
"name": "ROS2 Foxy", | |
"browse": { | |
"databaseFilename": "", | |
"limitSymbolsToIncludedHeaders": true | |
}, | |
"includePath": [ | |
"/home/lukic/webots/include/controller/cpp", |
NewerOlder