Skip to content

Instantly share code, notes, and snippets.

View luator's full-sized avatar

Felix Kloss luator

View GitHub Profile
@luator
luator / list_imports.py
Last active October 6, 2021 11:42
List all imports of one or many Python files
#!/usr/bin/env python3
"""List all packages that are imported in the specified Python files.
Generates an AST of the specified Python files and searches it for any
occurrence of "import"/"import from". The imported packages are listed for
each file in alphabetical order (independent of the location of the import in
the code).
"""
__author__ = "Felix Widmaier"
__copyright__ = "2021, Max Planck Gesellschaft"
@luator
luator / tricamera_log_viewer_dice.py
Created August 4, 2021 14:00
View/convert TriFinger camera logs and visualise the dice goal pattern
#!/usr/bin/env python3
"""
Play back TriCameraObjectObservations from a log file.
"""
import argparse
import json
import pathlib
import sys
import numpy as np
@luator
luator / trifinger_platform_log_viewer.py
Created July 21, 2021 08:25
Extended version of https://github.com/open-dynamic-robot-initiative/trifinger_object_tracking/blob/master/scripts/tricamera_log_viewer.py which also reads the robot log (in addition to the camera log) to get the time step information needed for visualising the change goal position of the trajectory.
#!/usr/bin/env python3
"""Play back TriCameraObjectObservations from a log file.
This is an extended version of the original script of the
trifinger_object_tracking package that also reads the robot log to get the time
step information needed to visualise the changing goal position.
"""
import argparse
import json
import pathlib
@luator
luator / gist:dd1d0d9112dfebfc734a06d9900054b0
Created September 21, 2018 06:54
Verbose catkin build output with circular exec_depend
❱ VERBOSE=1 catkin build -p1 -v
--------------------------------------------------------------------------
Profile: default
Extending: [env] /opt/ros/kinetic
Workspace: /home/fwidmaier/ws/catkin_tools_issue
--------------------------------------------------------------------------
Build Space: [exists] /home/fwidmaier/ws/catkin_tools_issue/build
Devel Space: [exists] /home/fwidmaier/ws/catkin_tools_issue/devel
Install Space: [unused] /home/fwidmaier/ws/catkin_tools_issue/install
Log Space: [missing] /home/fwidmaier/ws/catkin_tools_issue/logs