Skip to content

Instantly share code, notes, and snippets.

<html><head>
<!--link rel="icon" href='/favicon.ico'-->
<title>random_walk_03p_01.map</title>
<style>
a{
text-decoration: none;
color:#666;
}
a:hover{
color:#aaa;
use std;
import std::io;
import std::io::writer_util;
import std::io::writer;
import std::run;
fn run_rust(s: str) -> str {
let blacklist = ["run:","run :", "run\t:", "run :","while true","io::file", "for ;;", "fs::", "tempfile::"];
for i in blacklist { if str::contains(s,i) { ret "xD"; } }
use std;
import std::io;
import std::io::writer_util;
import std::io::writer;
import std::run;
fn run_rust(s: str) -> str {
let code = #fmt("use std;\nimport std::{io,dbg};\n\nfn main(){\n%s\n}\n", s);
let writer = result::get( io::file_writer( "out.rs", [io::create, io::truncate] ) );
#include <pcl/visualization/cloud_viewer.h>
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/calib3d/calib3d.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#include "opencv2/features2d/features2d.hpp"
int main (int argc, char** argv)
{
#include <pcl/visualization/cloud_viewer.h>
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/calib3d/calib3d.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/imgproc/imgproc_c.h" // cvRemap
#include "opencv2/features2d/features2d.hpp"
using namespace cv;
#include <pcl/visualization/cloud_viewer.h>
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/calib3d/calib3d.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/imgproc/imgproc_c.h" // cvRemap
#include "opencv2/features2d/features2d.hpp"
#include <stdlib.h>
#include <pcl/io/pcd_io.h>
#include <pcl/point_types.h>
#include <pcl/registration/icp.h>
#include <pcl/visualization/cloud_viewer.h>
void viewerOneOff( pcl::visualization::PCLVisualizer& viewer )
{
//viewer.setBackgroundColor (0.1, 0.1, 0.35);
viewer.setPointCloudRenderingProperties (pcl::visualization::PCL_VISUALIZER_POINT_SIZE, 2,"cloud_final");
/*
* Software License Agreement (BSD License)
*
* Point Cloud Library (PCL) - www.pointclouds.org
* Copyright (c) 2009-2012, Willow Garage, Inc.
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
// vfhv file1 file2 ...
int main(int argc, char* argv[])
{
pcl::visualization::PCLHistogramVisualizer h_vis;
for ( int i=1; i<argc; i++ )
{
pcl::PointCloud<pcl::VFHSignature308>::Ptr vfhs (new pcl::PointCloud<pcl::VFHSignature308>);
pcl::io::loadPCDFile ( argv[i], *vfhs);
h_vis.addFeatureHistogram(*vfhs , 308, argv[i]);
/*
* Software License Agreement (BSD License)
*
* Point Cloud Library (PCL) - www.pointclouds.org
* Copyright (c) 2010-2011, Willow Garage, Inc.
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions