View gazebo_uri_paths_to_mesh_files_in_ros_packages.xml
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> |
View list_r_packages_and_licenses.cmd
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. | |
) |
View recursive_glob_for_python2.py
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) |
View urdf_to_sdf_preserve_fixed_joint
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> |
View python_xml_etree_xpath_example.py
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 |
View install_google_cartographer_ros_with_local_protobuf_Version.sh
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 |
View get_str_objects_instead_of_unicode_from_json_using_object_hook.py
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 |
View pretty_print_nested_dictionaries_with_json_module.py
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)) | |
# { |
View ssh_from_windows_with_subprocess_openssh_example.py
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 |