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
void reverse_memcpy(unsigned char* dst, const unsigned char* src, size_t n) | |
{ | |
for (size_t i=0; i<n; ++i) | |
dst[n-1-i] = src[i]; | |
} | |
// ---------------------------------------------------------------------------- | |
sensor_msgs::PointCloud2 cloudmsg; | |
cloudmsg.header.stamp = _img->header.stamp; |
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 | |
# Given a directory with at least one bag file, find the filename with the | |
# latest timestamp (%Y-%m-%d-%H-%M-%S) in name and open it with `rqt_bag`. | |
# This is particularly useful given a directory of many rosbags that were | |
# created via `rosbag record` without an explicit filename. | |
# If the files were created with `rosbag record -o <name>`, then <name> | |
# will be appended with a timestamp, in which case the latest of *these* | |
# bags can be found with `./lastbag <name>`. | |
# | |
# Parker Lusk |
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 | |
function draw_uniform { | |
# generates a random float in [a b) | |
# n.b.: a, b must be ints | |
a=$1 | |
b=$2 | |
echo "$((a+RANDOM%(b-a))).$((RANDOM%999))" | |
} |
OlderNewer