This file contains 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
<!-- | |
https://stackoverflow.com/a/53759308 | |
https://answers.gazebosim.org//question/6416/using_a_urdf_in_gazebo-package-uris-not-described/?answer=6419#post-id-6419 | |
https://answers.ros.org/question/195402/creating-custom-gazebo-world-files-from-sdfsdaes-for-use-with-roslaunch/?answer=357489#post-id-357489 | |
--> | |
<package> | |
<!-- The *depend tags are used to specify dependencies --> | |
<!-- Dependencies can be catkin packages or system dependencies --> | |
<buildtool_depend>catkin</buildtool_depend> |
This file contains 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
@echo off | |
setlocal enableDelayedExpansion | |
set r_library_relative_path=R\library | |
echo %r_library_path% | |
for /d %%i in ("%~dp0%r_library_relative_path%\*") do ( | |
echo %%~nxi | |
findstr /b License: %%i\DESCRIPTION | |
echo. | |
) |
This file contains 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
# References: | |
# https://stackoverflow.com/a/2186639/8670609 | |
import os | |
import fnmatch | |
def recursive_glob(treeroot, pattern): | |
results = [] | |
for base, dirs, files in os.walk(treeroot): | |
goodfiles = fnmatch.filter(files, pattern) |
This file contains 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
<gazebo reference='joint_name'> | |
<preserveFixedJoint>true</preserveFixedJoint> | |
</gazebo> |
This file contains 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
# Python xml.etree with xpath | |
# | |
# References: | |
# The ElementTree XML API: https://docs.python.org/2/library/xml.etree.elementtree.html | |
import xml.etree | |
from xml.etree.ElementTree import Element | |
from xml.etree import ElementTree as ET | |
from xml.dom import minidom |
This file contains 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
# Install Google Cartographer and Local Protobuf Version | |
# | |
# Based on: | |
# install_cartographer_proto_locally.sh: https://gist.github.com/l1va/630043c4a23e6b3f5c73c088ba6b62d5 | |
# | |
# References: | |
# Cartographer ROS Integration: https://google-cartographer-ros.readthedocs.io/en/latest/index.html | |
# Compiling Cartographer ROS: https://google-cartographer-ros.readthedocs.io/en/latest/compilation.html | |
# This file was generated by an older version of protoc - #625: https://github.com/googlecartographer/cartographer_ros/issues/625 | |
# Issue8557 - subprocess PATH semantics and portability: https://bugs.python.org/issue8557 |
This file contains 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# Python: Get str objects instead of Unicode from JSON | |
# using object_hook | |
# | |
# Taken from: | |
# Source: https://stackoverflow.com/a/33571117 | |
import json |
This file contains 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
# Python: Print nested dictionaries | |
# | |
# Taken from: | |
# https://stackoverflow.com/a/3314411/8670609 | |
import json | |
print(json.dumps({'a':2, 'b':{'x':3, 'y':{'t1': 4, 't2':5}}}, | |
sort_keys=True, indent=4)) | |
# { |
This file contains 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
# SSH from Windows 10 using Python subprocess + built-in OpenSSH | |
# | |
# Alternatives to using subprocess include: | |
# Fabric: http://www.fabfile.org/ | |
# Paramiko: http://www.paramiko.org/ | |
# | |
# References: | |
# OpenSSH in Windows 10: https://blogs.msdn.microsoft.com/commandline/2018/01/22/openssh-in-windows-10/ | |
# The only simple way to do SSH in Python today is to use subprocess + OpenSSH...: https://gist.github.com/bortzmeyer/1284249 | |
# Issue8557 - subprocess PATH semantics and portability: https://bugs.python.org/issue8557 |