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
// Copyright (c) 2018, Chris Lalancette | |
// | |
// Redistribution and use in source and binary forms, with or without | |
// modification, are permitted provided that the following conditions are met: | |
// | |
// * Redistributions of source code must retain the above copyright | |
// notice, this list of conditions and the following disclaimer. | |
// | |
// * Redistributions in binary form must reproduce the above copyright | |
// notice, this list of conditions and the following disclaimer in the |
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
import hudson.model.Cause | |
count = 0 | |
for (p in Jenkins.instance.allItems) { | |
if ( | |
( | |
p.name.startsWith("lunar_") || | |
p.name.startsWith("Lsrc_") || | |
p.name.startsWith("Lbin_") || |
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
import hudson.model.Cause | |
count = 0 | |
for (p in Jenkins.instance.allItems) { | |
if ( | |
( | |
p.name.startsWith("indigo_") || | |
p.name.startsWith("Isrc_") || | |
p.name.startsWith("Ibin_") || |
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
import hudson.model.Cause | |
count = 0 | |
for (p in Jenkins.instance.allItems) { | |
if ( | |
( | |
p.name.startsWith("lunar_") || | |
p.name.startsWith("Lsrc_") || | |
p.name.startsWith("Lbin_") || |
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
import hudson.model.Cause | |
count = 0 | |
for (p in Jenkins.instance.allItems) { | |
if ( | |
( | |
p.name.startsWith("indigo_") || | |
p.name.startsWith("Isrc_") || | |
p.name.startsWith("Ibin_") || |
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/python3 | |
import sys | |
if len(sys.argv) != 3: | |
print("Usage: %s <input> <distro>" % (sys.argv[0])) | |
sys.exit(1) | |
infile = sys.argv[1] | |
distro = sys.argv[2] |
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
The goal here is to be able to use the ROS 2 python launch system to generate URDF files from xacro files, utilizing substitution. All of the comments below are an attempt to solve this problem. | |
# Robot state publisher | |
In order to make this work, it is easiest to use the refactored robot_state_publisher branch https://github.com/ros/robot_state_publisher/tree/ros2-refactor . The reason for this is that the refactor takes the `robot_description` as a parameter rather than as an argument on the command-line. This branch isn't currently reviewed or released into any ROS 2 distribution, so it needs to be built from source. (I'll note that it is probably *possible* to make all of this work with the version of robot_state_publisher released into Eloquent, but the rest of this comment will assume you are using the ros2-refactor branch). | |
``` | |
source /opt/ros/eloquent/setup.bash | |
mkdir -p rsp_ws/src | |
cd rsp_ws/src | |
git clone https://github.com/ros/robot_state_publisher -b ros2-refactor |
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
std::string get_unique_node_name() | |
{ | |
const static std::string chars = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; | |
static std::random_device rd; | |
static std::minstd_rand g{rd()}; | |
// The uniform_int_distribution takes a closed interval of [a, b]; since that | |
// would include the \0, we remove one from our string length. | |
static std::uniform_int_distribution<std::string::size_type> pick(0, chars.length() - 1); |
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
#!/bin/bash -xe | |
# FIXME: arguments to ignore certain files | |
usage() { | |
echo "Usage: $0 [OPTIONS]" | |
echo " OPTIONS:" | |
echo " -a <arg> Add any additional arguments to the clang-tidy command-line" | |
echo " -c <arg> Skip additional checks" | |
echo " -h Show this help message" |
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
#include <cmath> | |
#include <cstdio> | |
#include <tf2/LinearMath/Matrix3x3.h> | |
#include <tf2/LinearMath/Quaternion.h> | |
void print_quat(double x, double y, double z, double w) | |
{ | |
tf2::Quaternion quat(x, y, z, w); | |
fprintf(stderr, "Quaternion:\n"); |
OlderNewer