Full Code of ahq1993/MPNet for AI

master f38623bff346 cached
80 files
393.2 KB
107.5k tokens
450 symbols
1 requests
Download .txt
Showing preview only (419K chars total). Download the full file or copy to clipboard to get everything.
Repository: ahq1993/MPNet
Branch: master
Commit: f38623bff346
Files: 80
Total size: 393.2 KB

Directory structure:
gitextract_cfl6eb6l/

├── LICENSE
├── MPNet/
│   ├── AE/
│   │   ├── CAE.py
│   │   └── data_loader.py
│   ├── data_loader.py
│   ├── model.py
│   ├── neuralplanner.py
│   └── train.py
├── README.md
├── data_generation/
│   ├── Makefile
│   ├── README
│   ├── lcmtypes/
│   │   ├── CMakeLists.txt
│   │   ├── Makefile
│   │   ├── cmake/
│   │   │   ├── lcmtypes.cmake
│   │   │   └── pods.cmake
│   │   ├── lcmtypes/
│   │   │   ├── c/
│   │   │   │   └── lcmtypes/
│   │   │   │       ├── lcmtypes.h
│   │   │   │       ├── lcmtypes_edge_t.c
│   │   │   │       ├── lcmtypes_edge_t.h
│   │   │   │       ├── lcmtypes_environment_t.c
│   │   │   │       ├── lcmtypes_environment_t.h
│   │   │   │       ├── lcmtypes_graph_t.c
│   │   │   │       ├── lcmtypes_graph_t.h
│   │   │   │       ├── lcmtypes_region_3d_t.c
│   │   │   │       ├── lcmtypes_region_3d_t.h
│   │   │   │       ├── lcmtypes_state_t.c
│   │   │   │       ├── lcmtypes_state_t.h
│   │   │   │       ├── lcmtypes_trajectory_t.c
│   │   │   │       ├── lcmtypes_trajectory_t.h
│   │   │   │       ├── lcmtypes_vertex_t.c
│   │   │   │       └── lcmtypes_vertex_t.h
│   │   │   ├── java/
│   │   │   │   └── lcmtypes/
│   │   │   │       ├── edge_t.java
│   │   │   │       ├── environment_t.java
│   │   │   │       ├── graph_t.java
│   │   │   │       ├── region_3d_t.java
│   │   │   │       ├── state_t.java
│   │   │   │       ├── trajectory_t.java
│   │   │   │       └── vertex_t.java
│   │   │   ├── lcmtypes_edge_t.lcm
│   │   │   ├── lcmtypes_environment_t.lcm
│   │   │   ├── lcmtypes_graph_t.lcm
│   │   │   ├── lcmtypes_region_3d_t.lcm
│   │   │   ├── lcmtypes_state_t.lcm
│   │   │   ├── lcmtypes_trajectory_t.lcm
│   │   │   ├── lcmtypes_vertex_t.lcm
│   │   │   └── python/
│   │   │       └── lcmtypes/
│   │   │           ├── __init__.py
│   │   │           ├── edge_t.py
│   │   │           ├── environment_t.py
│   │   │           ├── graph_t.py
│   │   │           ├── region_3d_t.py
│   │   │           ├── state_t.py
│   │   │           ├── trajectory_t.py
│   │   │           └── vertex_t.py
│   │   └── pod.xml
│   ├── permute.cpp
│   ├── rrtstar/
│   │   ├── CMakeLists.txt
│   │   ├── Makefile
│   │   ├── cmake/
│   │   │   └── pods.cmake
│   │   ├── doxy/
│   │   │   └── doxy.conf
│   │   └── src/
│   │       ├── CMakeLists.txt
│   │       ├── CMakeLists.txt~
│   │       ├── kdtree.c
│   │       ├── kdtree.h
│   │       ├── rrts.h
│   │       ├── rrts.hpp
│   │       ├── rrts_main.cpp
│   │       ├── system.h
│   │       ├── system_single_integrator.cpp
│   │       └── system_single_integrator.h
│   ├── tobuild.txt
│   └── viewer/
│       ├── CMakeLists.txt
│       ├── Makefile
│       ├── README
│       ├── cmake/
│       │   └── pods.cmake
│       └── src/
│           ├── CMakeLists.txt
│           ├── main_viewer.cpp
│           └── renderers/
│               ├── CMakeLists.txt
│               ├── graph_renderer.cpp
│               ├── graph_renderer.h
│               └── graph_renderer.h~
├── readme
└── visualizer.py

================================================
FILE CONTENTS
================================================

================================================
FILE: LICENSE
================================================
MIT License

Copyright (c) 2018 Ahmed Qureshi

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


================================================
FILE: MPNet/AE/CAE.py
================================================
import argparse
import os
import torch
import torchvision
from torch import nn
from torch.autograd import Variable
from data_loader import load_dataset


class Encoder(nn.Module):
	def __init__(self):
		super(Encoder, self).__init__()
		self.encoder = nn.Sequential(nn.Linear(2800, 512),nn.PReLU(),nn.Linear(512, 256),nn.PReLU(),nn.Linear(256, 128),nn.PReLU(),nn.Linear(128, 28))
			
	def forward(self, x):
		x = self.encoder(x)
		return x

class Decoder(nn.Module):
	def __init__(self):
		super(Decoder, self).__init__()
		self.decoder = nn.Sequential(nn.Linear(28, 128),nn.PReLU(),nn.Linear(128, 256),nn.PReLU(),nn.Linear(256, 512),nn.PReLU(),nn.Linear(512, 2800))
	def forward(self, x):
		x = self.decoder(x)
		return x



mse_loss = nn.MSELoss()
lam=1e-3
def loss_function(W, x, recons_x, h):
	mse = mse_loss(recons_x, x)
	"""
	W is shape of N_hidden x N. So, we do not need to transpose it as opposed to http://wiseodd.github.io/techblog/2016/12/05/contractive-autoencoder/
	"""
	dh = h*(1-h) # N_batch x N_hidden
	contractive_loss = torch.sum(Variable(W)**2, dim=1).sum().mul_(lam)
	return mse + contractive_loss


def main(args):	
	
	if not os.path.exists(args.model_path):
		os.makedirs(args.model_path)


	obs = load_dataset()

	encoder = Encoder()
	decoder = Decoder()
	if torch.cuda.is_available():
		encoder.cuda()
		decoder.cuda()

	
	params = list(encoder.parameters())+list(decoder.parameters())
	optimizer = torch.optim.Adagrad(params)
	total_loss=[]
	for epoch in range(args.num_epochs):
		print "epoch" + str(epoch)
		avg_loss=0
		for i in range(0, len(obs), args.batch_size):
			decoder.zero_grad()
			encoder.zero_grad()
			if i+args.batch_size<len(obs):
				inp = obs[i:i+args.batch_size]
			else:
				inp = obs[i:]
			inp=torch.from_numpy(inp)
			inp =Variable(inp).cuda()
			# ===================forward=====================
			h = encoder(inp)
			output = decoder(h)
			keys=encoder.state_dict().keys()
			W=encoder.state_dict()['encoder.6.weight'] # regularize or contracting last layer of encoder. Print keys to displace the layers name. 
			loss = loss_function(W,inp,output,h)
			avg_loss=avg_loss+loss.data[0]
			# ===================backward====================
			loss.backward()
			optimizer.step()
		print "--average loss:"
		print avg_loss/(len(obs)/args.batch_size)
		total_loss.append(avg_loss/(len(obs)/args.batch_size))

	avg_loss=0
	for i in range(len(obs)-5000, len(obs), args.batch_size):
		inp = obs[i:i+args.batch_size]
		inp=torch.from_numpy(inp)
		inp =Variable(inp).cuda()
		# ===================forward=====================
		output = encoder(inp)
		output = decoder(output)
		loss = mse_loss(output,inp)
		avg_loss=avg_loss+loss.data[0]
		# ===================backward====================
	print "--Validation average loss:"
	print avg_loss/(5000/args.batch_size)


    
	torch.save(encoder.state_dict(),os.path.join(args.model_path,'cae_encoder.pkl'))
	torch.save(decoder.state_dict(),os.path.join(args.model_path,'cae_decoder.pkl'))
	torch.save(total_loss,'total_loss.dat')


if __name__ == '__main__':
	parser = argparse.ArgumentParser()
	parser.add_argument('--model_path', type=str, default='./models/',help='path for saving trained models')
	parser.add_argument('--no_env', type=int, default=50,help='directory for obstacle images')
	parser.add_argument('--no_motion_paths', type=int,default=2000,help='number of optimal paths in each environment')
	parser.add_argument('--log_step', type=int , default=10,help='step size for prining log info')
	parser.add_argument('--save_step', type=int , default=1000,help='step size for saving trained models')

	# Model parameters
	parser.add_argument('--input_size', type=int , default=18, help='dimension of the input vector')
	parser.add_argument('--output_size', type=int , default=2, help='dimension of the input vector')
	parser.add_argument('--hidden_size', type=int , default=256, help='dimension of lstm hidden states')
	parser.add_argument('--num_layers', type=int , default=4, help='number of layers in lstm')

	parser.add_argument('--num_epochs', type=int, default=400)
	parser.add_argument('--batch_size', type=int, default=100)
	parser.add_argument('--learning_rate', type=float, default=0.001)
	args = parser.parse_args()
	print(args)
	main(args)


================================================
FILE: MPNet/AE/data_loader.py
================================================
import torch
import torch.utils.data as data
import os
import pickle
import numpy as np
import nltk
from PIL import Image
import os.path
import random


def load_dataset(N=30000,NP=1800):

	obstacles=np.zeros((N,2800),dtype=np.float32)
	for i in range(0,N):
		temp=np.fromfile('../dataset2/obs_cloud/obc'+str(i)+'.dat')
		temp=temp.reshape(len(temp)/2,2)
		obstacles[i]=temp.flatten()

	
	return 	obstacles	


================================================
FILE: MPNet/data_loader.py
================================================
import torch
import torch.utils.data as data
import os
import pickle
import numpy as np
import nltk
from PIL import Image
import os.path
import random
from torch.autograd import Variable
import torch.nn as nn
import math

# Environment Encoder

class Encoder(nn.Module):
	def __init__(self):
		super(Encoder, self).__init__()
		self.encoder = nn.Sequential(nn.Linear(2800, 512),nn.PReLU(),nn.Linear(512, 256),nn.PReLU(),nn.Linear(256, 128),nn.PReLU(),nn.Linear(128, 28))
			
	def forward(self, x):
		x = self.encoder(x)
		return x

#N=number of environments; NP=Number of Paths
def load_dataset(N=100,NP=4000):

	Q = Encoder()
	Q.load_state_dict(torch.load('../models/cae_encoder.pkl'))
	if torch.cuda.is_available():
		Q.cuda()

		
	obs_rep=np.zeros((N,28),dtype=np.float32)
	for i in range(0,N):
		#load obstacle point cloud
		temp=np.fromfile('../../dataset/obs_cloud/obc'+str(i)+'.dat')
		temp=temp.reshape(len(temp)/2,2)
		obstacles=np.zeros((1,2800),dtype=np.float32)
		obstacles[0]=temp.flatten()
		inp=torch.from_numpy(obstacles)
		inp=Variable(inp).cuda()
		output=Q(inp)
		output=output.data.cpu()
		obs_rep[i]=output.numpy()



	
	## calculating length of the longest trajectory
	max_length=0
	path_lengths=np.zeros((N,NP),dtype=np.int8)
	for i in range(0,N):
		for j in range(0,NP):
			fname='../../dataset/e'+str(i)+'/path'+str(j)+'.dat'
			if os.path.isfile(fname):
				path=np.fromfile(fname)
				path=path.reshape(len(path)/2,2)
				path_lengths[i][j]=len(path)	
				if len(path)> max_length:
					max_length=len(path)
			

	paths=np.zeros((N,NP,max_length,2), dtype=np.float32)   ## padded paths

	for i in range(0,N):
		for j in range(0,NP):
			fname='../../dataset/e'+str(i)+'/path'+str(j)+'.dat'
			if os.path.isfile(fname):
				path=np.fromfile(fname)
				path=path.reshape(len(path)/2,2)
				for k in range(0,len(path)):
					paths[i][j][k]=path[k]
	
					

	dataset=[]
	targets=[]
	for i in range(0,N):
		for j in range(0,NP):
			if path_lengths[i][j]>0:				
				for m in range(0, path_lengths[i][j]-1):
					data=np.zeros(32,dtype=np.float32)
					for k in range(0,28):
						data[k]=obs_rep[i][k]
					data[28]=paths[i][j][m][0]
					data[29]=paths[i][j][m][1]
					data[30]=paths[i][j][path_lengths[i][j]-1][0]
					data[31]=paths[i][j][path_lengths[i][j]-1][1]
						
					targets.append(paths[i][j][m+1])
					dataset.append(data)
			
	data=zip(dataset,targets)
	random.shuffle(data)	
	dataset,targets=zip(*data)
	return 	np.asarray(dataset),np.asarray(targets) 

#N=number of environments; NP=Number of Paths; s=starting environment no.; sp=starting_path_no
#Unseen_environments==> N=10, NP=2000,s=100, sp=0
#seen_environments==> N=100, NP=200,s=0, sp=4000
def load_test_dataset(N=100,NP=200, s=0,sp=4000):

	obc=np.zeros((N,7,2),dtype=np.float32)
	temp=np.fromfile('../../dataset/obs.dat')
	obs=temp.reshape(len(temp)/2,2)

	temp=np.fromfile('../../dataset/obs_perm2.dat',np.int32)
	perm=temp.reshape(77520,7)

	## loading obstacles
	for i in range(0,N):
		for j in range(0,7):
			for k in range(0,2):
				obc[i][j][k]=obs[perm[i+s][j]][k]
	
					
	Q = Encoder()
	Q.load_state_dict(torch.load('../models/cae_encoder.pkl'))
	if torch.cuda.is_available():
		Q.cuda()
	
	obs_rep=np.zeros((N,28),dtype=np.float32)	
	k=0
	for i in range(s,s+N):
		temp=np.fromfile('../../dataset/obs_cloud/obc'+str(i)+'.dat')
		temp=temp.reshape(len(temp)/2,2)
		obstacles=np.zeros((1,2800),dtype=np.float32)
		obstacles[0]=temp.flatten()
		inp=torch.from_numpy(obstacles)
		inp=Variable(inp).cuda()
		output=Q(inp)
		output=output.data.cpu()
		obs_rep[k]=output.numpy()
		k=k+1
	## calculating length of the longest trajectory
	max_length=0
	path_lengths=np.zeros((N,NP),dtype=np.int8)
	for i in range(0,N):
		for j in range(0,NP):
			fname='../../dataset/e'+str(i+s)+'/path'+str(j+sp)+'.dat'
			if os.path.isfile(fname):
				path=np.fromfile(fname)
				path=path.reshape(len(path)/2,2)
				path_lengths[i][j]=len(path)	
				if len(path)> max_length:
					max_length=len(path)
			

	paths=np.zeros((N,NP,max_length,2), dtype=np.float32)   ## padded paths

	for i in range(0,N):
		for j in range(0,NP):
			fname='../../dataset/e'+str(i+s)+'/path'+str(j+sp)+'.dat'
			if os.path.isfile(fname):
				path=np.fromfile(fname)
				path=path.reshape(len(path)/2,2)
				for k in range(0,len(path)):
					paths[i][j][k]=path[k]
	
					



	return 	obc,obs_rep,paths,path_lengths
	




================================================
FILE: MPNet/model.py
================================================
import torch
import torch.nn as nn
import torchvision.models as models
from torch.nn.utils.rnn import pack_padded_sequence
from torch.autograd import Variable


# DMLP Model-Path Generator 
class MLP(nn.Module):
	def __init__(self, input_size, output_size):
		super(MLP, self).__init__()
		self.fc = nn.Sequential(
		nn.Linear(input_size, 1280),nn.PReLU(),nn.Dropout(),
		nn.Linear(1280, 1024),nn.PReLU(),nn.Dropout(),
		nn.Linear(1024, 896),nn.PReLU(),nn.Dropout(),
		nn.Linear(896, 768),nn.PReLU(),nn.Dropout(),
		nn.Linear(768, 512),nn.PReLU(),nn.Dropout(),
		nn.Linear(512, 384),nn.PReLU(),nn.Dropout(),
		nn.Linear(384, 256),nn.PReLU(), nn.Dropout(),
		nn.Linear(256, 256),nn.PReLU(), nn.Dropout(),
		nn.Linear(256, 128),nn.PReLU(), nn.Dropout(),
		nn.Linear(128, 64),nn.PReLU(), nn.Dropout(),
		nn.Linear(64, 32),nn.PReLU(),
		nn.Linear(32, output_size))
		
        
	def forward(self, x):
		out = self.fc(x)
		return out

 


================================================
FILE: MPNet/neuralplanner.py
================================================
import argparse
import torch
import torch.nn as nn
import numpy as np
import os
import pickle
from data_loader import load_test_dataset 
from model import MLP 
from torch.autograd import Variable 
import math
import time

size=5.0

# Load trained model for path generation
mlp = MLP(32, 2) # simple @D
mlp.load_state_dict(torch.load('models/mlp_100_4000_PReLU_ae_dd150.pkl'))

if torch.cuda.is_available():
	mlp.cuda()

#load test dataset
obc,obstacles, paths, path_lengths= load_test_dataset() 

def IsInCollision(x,idx):
	s=np.zeros(2,dtype=np.float32)
	s[0]=x[0]
	s[1]=x[1]
	for i in range(0,7):
		cf=True
		for j in range(0,2):
			if abs(obc[idx][i][j] - s[j]) > size/2.0:
				cf=False
				break
		if cf==True:						
			return True
	return False


def steerTo (start, end, idx):

	DISCRETIZATION_STEP=0.01
	dists=np.zeros(2,dtype=np.float32)
	for i in range(0,2): 
		dists[i] = end[i] - start[i]

	distTotal = 0.0
	for i in range(0,2): 
		distTotal =distTotal+ dists[i]*dists[i]

	distTotal = math.sqrt(distTotal)
	if distTotal>0:
		incrementTotal = distTotal/DISCRETIZATION_STEP
		for i in range(0,2): 
			dists[i] =dists[i]/incrementTotal



		numSegments = int(math.floor(incrementTotal))

		stateCurr = np.zeros(2,dtype=np.float32)
		for i in range(0,2): 
			stateCurr[i] = start[i]
		for i in range(0,numSegments):

			if IsInCollision(stateCurr,idx):
				return 0

			for j in range(0,2):
				stateCurr[j] = stateCurr[j]+dists[j]


		if IsInCollision(end,idx):
			return 0


	return 1

# checks the feasibility of entire path including the path edges
def feasibility_check(path,idx):

	for i in range(0,len(path)-1):
		ind=steerTo(path[i],path[i+1],idx)
		if ind==0:
			return 0
	return 1


# checks the feasibility of path nodes only
def collision_check(path,idx):

	for i in range(0,len(path)):
		if IsInCollision(path[i],idx):
			return 0
	return 1

def to_var(x, volatile=False):
	if torch.cuda.is_available():
		x = x.cuda()
	return Variable(x, volatile=volatile)

def get_input(i,dataset,targets,seq,bs):
	bi=np.zeros((bs,18),dtype=np.float32)
	bt=np.zeros((bs,2),dtype=np.float32)
	k=0	
	for b in range(i,i+bs):
		bi[k]=dataset[seq[i]].flatten()
		bt[k]=targets[seq[i]].flatten()
		k=k+1
	return torch.from_numpy(bi),torch.from_numpy(bt)



def is_reaching_target(start1,start2):
	s1=np.zeros(2,dtype=np.float32)
	s1[0]=start1[0]
	s1[1]=start1[1]

	s2=np.zeros(2,dtype=np.float32)
	s2[0]=start2[0]
	s2[1]=start2[1]


	for i in range(0,2):
		if abs(s1[i]-s2[i]) > 1.0: 
			return False
	return True

#lazy vertex contraction 
def lvc(path,idx):

	for i in range(0,len(path)-1):
		for j in range(len(path)-1,i+1,-1):
			ind=0
			ind=steerTo(path[i],path[j],idx)
			if ind==1:
				pc=[]
				for k in range(0,i+1):
					pc.append(path[k])
				for k in range(j,len(path)):
					pc.append(path[k])

				return lvc(pc,idx)
				
	return path

def re_iterate_path2(p,g,idx,obs):
	step=0
	path=[]
	path.append(p[0])
	for i in range(1,len(p)-1):
		if not IsInCollision(p[i],idx):
			path.append(p[i])
	path.append(g)			
	new_path=[]
	for i in range(0,len(path)-1):
		target_reached=False

	 
		st=path[i]
		gl=path[i+1]
		steer=steerTo(st, gl, idx)
		if steer==1:
			new_path.append(st)
			new_path.append(gl)
		else:
			itr=0
			target_reached=False
			while (not target_reached) and itr<50 :
				new_path.append(st)
				itr=itr+1
				ip=torch.cat((obs,st,gl))
				ip=to_var(ip)
				st=mlp(ip)
				st=st.data.cpu()		
				target_reached=is_reaching_target(st,gl)
			if target_reached==False:
				return 0

	#new_path.append(g)
	return new_path

def replan_path(p,g,idx,obs):
	step=0
	path=[]
	path.append(p[0])
	for i in range(1,len(p)-1):
		if not IsInCollision(p[i],idx):
			path.append(p[i])
	path.append(g)			
	new_path=[]
	for i in range(0,len(path)-1):
		target_reached=False

	 
		st=path[i]
		gl=path[i+1]
		steer=steerTo(st, gl, idx)
		if steer==1:
			new_path.append(st)
			new_path.append(gl)
		else:
			itr=0
			pA=[]
			pA.append(st)
			pB=[]
			pB.append(gl)
			target_reached=0
			tree=0
			while target_reached==0 and itr<50 :
				itr=itr+1
				if tree==0:
					ip1=torch.cat((obs,st,gl))
					ip1=to_var(ip1)
					st=mlp(ip1)
					st=st.data.cpu()
					pA.append(st)
					tree=1
				else:
					ip2=torch.cat((obs,gl,st))
					ip2=to_var(ip2)
					gl=mlp(ip2)
					gl=gl.data.cpu()
					pB.append(gl)
					tree=0		
				target_reached=steerTo(st, gl, idx)
			if target_reached==0:
				return 0
			else:
				for p1 in range(0,len(pA)):
					new_path.append(pA[p1])
				for p2 in range(len(pB)-1,-1,-1):
					new_path.append(pB[p2])

	return new_path	
    
def main(args):
	# Create model directory
	if not os.path.exists(args.model_path):
		os.makedirs(args.model_path)
	

	
	tp=0
	fp=0
	tot=[]
	for i in range(0,1):
		et=[]
		for j in range(0,2):
			print ("step: i="+str(i)+" j="+str(j))
			p1_ind=0
			p2_ind=0
			p_ind=0	
			if path_lengths[i][j]>0:								
				start=np.zeros(2,dtype=np.float32)
				goal=np.zeros(2,dtype=np.float32)
				for l in range(0,2):
					start[l]=paths[i][j][0][l]
				
				for l in range(0,2):
					goal[l]=paths[i][j][path_lengths[i][j]-1][l]
				#start and goal for bidirectional generation
				## starting point
				start1=torch.from_numpy(start)
				goal2=torch.from_numpy(start)
				##goal point
				goal1=torch.from_numpy(goal)
				start2=torch.from_numpy(goal)
				##obstacles
				obs=obstacles[i]
				obs=torch.from_numpy(obs)
				##generated paths
				path1=[] 
				path1.append(start1)
				path2=[]
				path2.append(start2)
				path=[]
				target_reached=0
				step=0	
				path=[] # stores end2end path by concatenating path1 and path2
				tree=0	
				tic = time.clock()	
				while target_reached==0 and step<80 :
					step=step+1
					if tree==0:
						inp1=torch.cat((obs,start1,start2))
						inp1=to_var(inp1)
						start1=mlp(inp1)
						start1=start1.data.cpu()
						path1.append(start1)
						tree=1
					else:
						inp2=torch.cat((obs,start2,start1))
						inp2=to_var(inp2)
						start2=mlp(inp2)
						start2=start2.data.cpu()
						path2.append(start2)
						tree=0
					target_reached=steerTo(start1,start2,i);
				tp=tp+1

				if target_reached==1:
					for p1 in range(0,len(path1)):
						path.append(path1[p1])
					for p2 in range(len(path2)-1,-1,-1):
						path.append(path2[p2])
													
					
					path=lvc(path,i)
					indicator=feasibility_check(path,i)
					if indicator==1:
						toc = time.clock()
						t=toc-tic
						et.append(t)
						fp=fp+1
						print ("path[0]:")
						for p in range(0,len(path)):
							print (path[p][0])
						print ("path[1]:")
						for p in range(0,len(path)):
							print (path[p][1])
						print ("Actual path[0]:")
						for p in range(0,path_lengths[i][j]):
							print (paths[i][j][p][0])
						print ("Actual path[1]:")
						for p in range(0,path_lengths[i][j]):
							print (paths[i][j][p][1])
					else:
						sp=0
						indicator=0
						while indicator==0 and sp<10 and path !=0:
							sp=sp+1
							g=np.zeros(2,dtype=np.float32)
							g=torch.from_numpy(paths[i][j][path_lengths[i][j]-1])
							path=replan_path(path,g,i,obs) #replanning at coarse level
							if path !=0:
								path=lvc(path,i)
								indicator=feasibility_check(path,i)
					
							if indicator==1:
								toc = time.clock()
								t=toc-tic
								et.append(t)
								fp=fp+1
								if len(path)<20:
									print ("new_path[0]:")
									for p in range(0,len(path)):
										print (path[p][0])
									print ("new_path[1]:")
									for p in range(0,len(path)):
										print (path[p][1])
									print ("Actual path[0]:")
									for p in range(0,path_lengths[i][j]):
										print (paths[i][j][p][0])
									print ("Actual path[1]:")
									for p in range(0,path_lengths[i][j]):
										print (paths[i][j][p][1])
								else:
									print "path found, dont worry"	

				
		tot.append(et)					
	pickle.dump(tot, open("time_s2D_unseen_mlp.p", "wb" ))	


	print ("total paths")
	print (tp)
	print ("feasible paths")
	print (fp)

if __name__ == '__main__':
	parser = argparse.ArgumentParser()
	parser.add_argument('--model_path', type=str, default='./models/',help='path for saving trained models')
	parser.add_argument('--no_env', type=int, default=50,help='directory for obstacle images')
	parser.add_argument('--no_motion_paths', type=int,default=2000,help='number of optimal paths in each environment')
	parser.add_argument('--log_step', type=int , default=10,help='step size for prining log info')
	parser.add_argument('--save_step', type=int , default=1000,help='step size for saving trained models')

	# Model parameters
	parser.add_argument('--input_size', type=int , default=68, help='dimension of the input vector')
	parser.add_argument('--output_size', type=int , default=2, help='dimension of the input vector')
	parser.add_argument('--hidden_size', type=int , default=256, help='dimension of lstm hidden states')
	parser.add_argument('--num_layers', type=int , default=4, help='number of layers in lstm')

	parser.add_argument('--num_epochs', type=int, default=100)
	parser.add_argument('--batch_size', type=int, default=28)
	parser.add_argument('--learning_rate', type=float, default=0.001)
	args = parser.parse_args()
	print(args)
	main(args)




================================================
FILE: MPNet/train.py
================================================
import argparse
import torch
import torch.nn as nn
import numpy as np
import os
import pickle
from data_loader import load_dataset 
from model import MLP 
from torch.autograd import Variable 
import math

def to_var(x, volatile=False):
	if torch.cuda.is_available():
		x = x.cuda()
	return Variable(x, volatile=volatile)

def get_input(i,data,targets,bs):

	if i+bs<len(data):
		bi=data[i:i+bs]
		bt=targets[i:i+bs]	
	else:
		bi=data[i:]
		bt=targets[i:]
		
	return torch.from_numpy(bi),torch.from_numpy(bt)


    
def main(args):
	# Create model directory
	if not os.path.exists(args.model_path):
		os.makedirs(args.model_path)
    
    
	# Build data loader
	dataset,targets= load_dataset() 
	
	# Build the models
	mlp = MLP(args.input_size, args.output_size)
    
	if torch.cuda.is_available():
		mlp.cuda()

	# Loss and Optimizer
	criterion = nn.MSELoss()
	optimizer = torch.optim.Adagrad(mlp.parameters()) 
    
	# Train the Models
	total_loss=[]
	print len(dataset)
	print len(targets)
	sm=100 # start saving models after 100 epochs
	for epoch in range(args.num_epochs):
		print "epoch" + str(epoch)
		avg_loss=0
		for i in range (0,len(dataset),args.batch_size):
			# Forward, Backward and Optimize
			mlp.zero_grad()			
			bi,bt= get_input(i,dataset,targets,args.batch_size)
			bi=to_var(bi)
			bt=to_var(bt)
			bo = mlp(bi)
			loss = criterion(bo,bt)
			avg_loss=avg_loss+loss.data[0]
			loss.backward()
			optimizer.step()
		print "--average loss:"
		print avg_loss/(len(dataset)/args.batch_size)
		total_loss.append(avg_loss/(len(dataset)/args.batch_size))
		# Save the models
		if epoch==sm:
			model_path='mlp_100_4000_PReLU_ae_dd'+str(sm)+'.pkl'
			torch.save(mlp.state_dict(),os.path.join(args.model_path,model_path))
			sm=sm+50 # save model after every 50 epochs from 100 epoch ownwards
	torch.save(total_loss,'total_loss.dat')
	model_path='mlp_100_4000_PReLU_ae_dd_final.pkl'
	torch.save(mlp.state_dict(),os.path.join(args.model_path,model_path))
if __name__ == '__main__':
	parser = argparse.ArgumentParser()
	parser.add_argument('--model_path', type=str, default='./models/',help='path for saving trained models')
	parser.add_argument('--no_env', type=int, default=50,help='directory for obstacle images')
	parser.add_argument('--no_motion_paths', type=int,default=2000,help='number of optimal paths in each environment')
	parser.add_argument('--log_step', type=int , default=10,help='step size for prining log info')
	parser.add_argument('--save_step', type=int , default=1000,help='step size for saving trained models')

	# Model parameters
	parser.add_argument('--input_size', type=int , default=32, help='dimension of the input vector')
	parser.add_argument('--output_size', type=int , default=2, help='dimension of the input vector')
	parser.add_argument('--hidden_size', type=int , default=256, help='dimension of lstm hidden states')
	parser.add_argument('--num_layers', type=int , default=4, help='number of layers in lstm')

	parser.add_argument('--num_epochs', type=int, default=500)
	parser.add_argument('--batch_size', type=int, default=100)
	parser.add_argument('--learning_rate', type=float, default=0.0001)
	args = parser.parse_args()
	print(args)
	main(args)





================================================
FILE: README.md
================================================
# Motion Planning Networks
Implementation of [MPNet: Motion Planning Networks](https://sites.google.com/view/mpnet). [[arXiv1]](https://arxiv.org/abs/1806.05767) [[arXiv2]](https://arxiv.org/abs/1907.06013) 


The code can easily be adapted for [Informed Neural Sampling](https://arxiv.org/abs/1809.10252).

## Contains
* Data Generation
	* Any existing classical motion planner can be used to generate datasets. However, we provide following implementations in C++:
		* [P-RRT*](https://link.springer.com/article/10.1007/s10514-015-9518-0)
		* [RRT*](https://arxiv.org/abs/1105.1186)
		* Example dataset: [simple2D](https://drive.google.com/open?id=1oADJ85qxb3WKHXE4Bj6lwio-soGOktRa)
		* Example dataset: [Complex3D](https://drive.google.com/file/d/1wNPfdVGkkZ-7haTUhdzT0sGnZAkAJEol/view?usp=sharing)
* MPNet algorithm
* A navie python visualization files


## Data Description
* Simple 2D has 7 blocks each of size 5x5 that are placed randomly.
* Complex 3D contains 10 blocks with sizes as follow:
	* shape=[[5.0,5.0,10.0],[5.0,10.0,5.0],[5.0,10.0,10.0],
              [10.0,5.0,5.0],[10.0,5.0,10.0],[10.0,10.0,5.0],
              [10.0,10.0,10.0],[5.0,5.0,5.0],[10.0,10.0,10.0],[5.0,5.0,5.0]]
* e0-109 has the training and testing paths in 110 different environments.
	* 0-100 environments and 0-4000 paths/environment are for training.
	* Seen test dataset: 0-100 envs and 4000-4200=200 paths/env.
	* Unseen test dataset: 100-110 envs and 0-2000 paths/env.
* obs_cloud is the point-cloud of randomly generated 30,000 environments.
	* 0-110 corresponds to the same environments for which path data is provided.
	* You may use full dataset to train encoder network via unsupervised learning.
* obs.dat contains the center location (x,y) of each obstacle in the environments.
* obs_perm2.dat contains the order in which the blocks should be placed in preset locations given by obs.dat file to setup environments.
	* For instance, in complex 3D, the permutation 8342567901 indicates obstacle #8 of size 10x10x10 should be placed at the location #0 given by obs.dat.

## Generating your own data
* Define a region of operation, for instance in simple2D, it is 20x20
* Decide how many obstacles (r) you would like to place in the region. In the case of simple2D, we have r=7 5x5 blocks.
* Generate random N locations to place r obstacles in the region. In the case of simple2D, we generated N=20.
* For N locations and r obstacles, apply combinatorics, to generate NCr different environments i.e., in simple 2D NCr= 20C7= 77520
 	* The obs_perm2 file contains the combinations, for instance 6432150 indicates to place obstacle#6 at location #0.
* Once obstacles are placed, randomly generate collision-free samples and use them in pairs as stat-goal to generate paths using any classical planne for the training. For classical planners, we recommend using [OMPL](https://ompl.kavrakilab.org/) implementations.


## Requirements
* Data Generation

	1. Install [libbot2]( https://github.com/libbot2/libbot2)
		* Make sure all dependencies of libbot2 (e.g., lcm) are installed.
		* Install libbot2 with the local installation procedure.
		* Run "make" in the data_generation folder where the README file is located.

	2. Use any compiler such as Netbeans to load the precomplie code.
		* data_generation/src/rrts_main.cpp contains the main rrt/prrt code. 	
		* data_generation/viewer/src/viewer_main.cpp contains the visualization code.
			* Also checkout comments in data_generation/viewer/src/renderers/graph_renderer.cpp

		* Note: main_viewer and rrts_main should run in parallel as:
			* rrts_main sends the path solution as well as the tree to the main_viewer to publish through local network.
			* data is transmitted through LCM network protocol.

* MPNet
	* [PyTorch](http://pytorch.org/) 


## Examples

1. Assuming paths to obstacles point-cloud are declared, train obstacle-encoder:
```python MPNET/AE/CAE.py```

2. Assuming paths to demonstration dataset and obstacle-encoder are declared, run mpnet_trainer:
	
    ```python MPNET/train.py```
    
3. Run tests by first loading the trained models:
	
    ```python MPNET/neuralplanner.py``` 

## References

```
@inproceedings{qureshi2019motion,
  title={Motion planning networks},
  author={Qureshi, Ahmed H and Simeonov, Anthony and Bency, Mayur J and Yip, Michael C},
  booktitle={2019 International Conference on Robotics and Automation (ICRA)},
  pages={2118--2124},
  year={2019},
  organization={IEEE}
}
@inproceedings{qureshi2018deeply,
  title={Deeply Informed Neural Sampling for Robot Motion Planning},
  author={Qureshi, Ahmed H and Yip, Michael C},
  booktitle={2018 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS)},
  pages={6582--6588},
  year={2018},
  organization={IEEE}
}
@article{qureshi2019motion,
  title={Motion Planning Networks: Bridging the Gap Between Learning-based and Classical Motion Planners},
  author={Qureshi, Ahmed H and Miao, Yinglong and Simeonov, Anthony and Yip, Michael C},
  journal={arXiv preprint arXiv:1907.06013},
  year={2019}
}
```




================================================
FILE: data_generation/Makefile
================================================
default_target: all

# get a list of subdirs to build by reading tobuild.txt
SUBDIRS:=$(shell grep -v "^\#" tobuild.txt)

#force to build on the top level build dir
BUILD_PREFIX=`pwd`/build


# build quietly by default.  For a verbose build, run "make VERBOSE=1"
$(VERBOSE).SILENT:

all: 
	@[ -d $(BUILD_PREFIX) ] || mkdir -p $(BUILD_PREFIX) || exit 1
	@for subdir in $(SUBDIRS); do \
		echo "\n-------------------------------------------"; \
		echo "-- $$subdir"; \
		echo "-------------------------------------------"; \
		$(MAKE) -C $$subdir all || exit 2; \
	done
	@# Place additional commands here if you have any

clean:
	@for subdir in $(SUBDIRS); do \
		echo "\n-------------------------------------------"; \
		echo "-- $$subdir"; \
		echo "-------------------------------------------"; \
		$(MAKE) -C $$subdir clean; \
	done
	rm -rf build/bin
	rm -rf build/include
	rm -rf build/lib
	rm -rf build/share
	@# Place additional commands here if you have any


================================================
FILE: data_generation/README
================================================
To install with libbot2:

1. Check out libbot2 from 
https://github.com/libbot2/libbot2

2. Make sure all dependencies of libbot2 (e.g., lcm) are installed.

3. Install libbot2 with the local installation procedure.

4. Run "make" in the folder where this README file is located.

5. Once complied, one can use Netbeans C/C++ IDE to load the pre-compiled project.

6- Run viewer for visualization as follow or build&run using netbeans:
```g++ viewer/src/main_viewer.cpp```
7- Run rrtstar/prrtstar as follow or build&run using netbeans:
```g++ rrtstar/src/rrts_main.cpp```

#Note: main_viewer and rrts_main should run in parallel as:
-rrts_main sends the path solution as well as the tree to the main_viewer to publish through local network.
-data is transmitted through LCM network protocol.







================================================
FILE: data_generation/lcmtypes/CMakeLists.txt
================================================
SET(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/usr/local/lib/pkgconfig:/opt/local/lib/pkgconfig:/usr/local/share/pkgconfig")

cmake_minimum_required(VERSION 2.6.0)

set(POD_NAME lcmtypes)
include(cmake/pods.cmake)

# automatically build LCM types.  This also defines a number of CMake
# variables, see cmake/lcmtypes.cmake for details
include(cmake/lcmtypes.cmake)
lcmtypes_build()

include_directories(${LCMTYPES_INCLUDE_DIRS})

pods_install_pkg_config_file(lcmtypes
    CFLAGS
    LIBS -llcmtypes_lcmtypes
    VERSION 0.0.1)


================================================
FILE: data_generation/lcmtypes/Makefile
================================================
# Default makefile distributed with pods version: 11.02.09

default_target: all

# Default to a less-verbose build.  If you want all the gory compiler output,
# run "make VERBOSE=1"
$(VERBOSE).SILENT:

# Figure out where to build the software.
#   Use BUILD_PREFIX if it was passed in.
#   If not, search up to four parent directories for a 'build' directory.
#   Otherwise, use ./build.
ifeq "$(BUILD_PREFIX)" ""
BUILD_PREFIX:=$(shell for pfx in .. ../.. ../../.. ../../../..; do d=`pwd`/$$pfx/build;\
               if [ -d $$d ]; then echo $$d; exit 0; fi; done; echo `pwd`/build)
endif
# create the build directory if needed, and normalize its path name
BUILD_PREFIX:=$(shell mkdir -p $(BUILD_PREFIX) && cd $(BUILD_PREFIX) && echo `pwd`)

# Default to a release build.  If you want to enable debugging flags, run
# "make BUILD_TYPE=Debug"
ifeq "$(BUILD_TYPE)" ""
BUILD_TYPE="Release"
endif

all: pod-build/Makefile
	$(MAKE) -C pod-build all install

pod-build/Makefile:
	$(MAKE) configure

.PHONY: configure
configure:
	@echo "\nBUILD_PREFIX: $(BUILD_PREFIX)\n\n"

	# create the temporary build directory if needed
	@mkdir -p pod-build

	# run CMake to generate and configure the build scripts
	@cd pod-build && cmake -DCMAKE_INSTALL_PREFIX=$(BUILD_PREFIX) \
		   -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) ..

clean:
	-if [ -e pod-build/install_manifest.txt ]; then rm -f `cat pod-build/install_manifest.txt`; fi
	-if [ -d pod-build ]; then $(MAKE) -C pod-build clean; rm -rf pod-build; fi


================================================
FILE: data_generation/lcmtypes/cmake/lcmtypes.cmake
================================================
# Macros for automatically compiling LCM types into C, Java, and Python
# libraries.
#
# The primary macro is:
#     lcmtypes_build([C_AGGREGATE_HEADER header_fname] 
#                    [C_LIBNAME lib_name]
#                    [JAVA_DEST_DIR dir_name]
#                    [PY_DEST_DIR dir_name]
#                    )
# 
# It expects that the directory ${PROJECT_SOURCE_DIR}/lcmtypes contains all
# the LCM types used by the system.  The macro generates C, Java, and Python
# bindings.  See the C, Java, and Python sections below for information on
# language specific options and generated results.
#
# After invoking this macro, the following variables will be set:
#
#   LCMTYPES_INCLUDE_DIRS
#   LCMTYPES_LIBS
#   LCMTYPES_JAR
#
# 
# C
# ==
# 
# C bindings will be placed in ${PROJECT_SOURCE_DIR}/lcmtypes/c.  This
# directory is also stored in LCMTYPES_INCLUDE_DIRS on output.
#
# The autogenerated C bindings also get compiled to a static and shared
# library.  The library prefix will be stored in LCMTYPES_LIBS on output.
# This prefix can be manually set using the C_LIBNAME option.
# 
# Additionally, a header file will be generated that automatically includes
# all of the other automatically generated header files.  The name of this
# header file defaults to a cleaned-up version of "${PROJECT_NAME}.h" 
# (non-alphanumeric characters replaced with underscores), but can
# be manually set using the C_AGGREGATE_HEADER option.
#
#
# Java
# ====
#
# If Java is available, then Java bindings are be generated and placed in 
#    ${PROJECT_SOURCE_DIR}/lcmtypes/java
#
# This directory can be changed using the JAVA_DEST_DIR option.
# 
# Additionally, targets are added to automatically compile the .java files to a
# .jar file. The location of this jar file is stored in LCMTYPES_JAR
#
# and the .jar file will be installed to 
#   ${CMAKE_INSTALL_PREFIX}/share/java
#
#
# Python
# ======
#
# If Python is enabled, then python bindings will be generated and placed in 
#    ${PROJECT_SOURCE_DIR}/lcmtypes/python
# 
# This directory can be changed by setting the PY_DEST_DIR option.
#
# Additionally, the .py files will be installed to 
#   ${CMAKE_INSTALL_PREFIX}/lib/python{X.Y}/site-packages
#   
# where {X.Y} refers to the python version used to build the .py files.
#
# ----
# File: lcmtypes.cmake
# Distributed with pods version: 11.02.09

cmake_minimum_required(VERSION 2.6.0)

# Policy settings to prevent warnings on 2.6 but ensure proper operation on
# 2.4.
if(COMMAND cmake_policy)
    # Logical target names must be globally unique.
    cmake_policy(SET CMP0002 OLD)
    # Libraries linked via full path no longer produce linker search paths.
    cmake_policy(SET CMP0003 OLD)
    # Preprocessor definition values are now escaped automatically.
    cmake_policy(SET CMP0005 OLD)
    if(POLICY CMP0011)
        # Included scripts do automatic cmake_policy PUSH and POP.
        cmake_policy(SET CMP0011 OLD)
    endif(POLICY CMP0011)
endif()

macro(lcmtypes_get_types msgvar)
    # get a list of all LCM types
    file(GLOB __tmplcmtypes "${PROJECT_SOURCE_DIR}/lcmtypes/*.lcm")
    set(${msgvar} "")
    foreach(_msg ${__tmplcmtypes})
        # Try to filter out temporary and backup files
        if(${_msg} MATCHES "^[^\\.].*\\.lcm$")
            list(APPEND ${msgvar} ${_msg})
        endif(${_msg} MATCHES "^[^\\.].*\\.lcm$")
    endforeach(_msg)
endmacro()

function(lcmgen)
    execute_process(COMMAND lcm-gen ${ARGV} RESULT_VARIABLE lcmgen_result)
    if(NOT lcmgen_result EQUAL 0)
        message(FATAL_ERROR "lcm-gen failed")
    endif()
endfunction()

function(lcmtypes_add_clean_dir clean_dir)
    get_directory_property(acfiles ADDITIONAL_MAKE_CLEAN_FILES)
    list(APPEND acfiles ${clean_dir})
    set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${acfiles}")
endfunction()

function(lcmtypes_build_c)
    lcmtypes_get_types(_lcmtypes)
    list(LENGTH _lcmtypes _num_lcmtypes)
    if(_num_lcmtypes EQUAL 0)
        return()
    endif()

    string(REGEX REPLACE "[^a-zA-Z0-9]" "_" __sanitized_project_name "${PROJECT_NAME}")

    # set some defaults

    # library name
    set(libname "lcmtypes_${PROJECT_NAME}")

    # header file that includes all other generated header files
    set(agg_h_bname "${__sanitized_project_name}.h")

    # allow defaults to be overriden by function parameters
    set(modewords C_LIBNAME C_AGGREGATE_HEADER)
    set(curmode "")
    foreach(word ${ARGV})
        list(FIND modewords ${word} mode_index)
        if(${mode_index} GREATER -1)
            set(curmode ${word})
        elseif(curmode STREQUAL C_AGGREGATE_HEADER)
            set(agg_h_bname "${word}")
            set(curmode "")
        elseif(curmode STREQUAL C_LIBNAME)
            set(libname "${word}")
            set(curmode "")
        endif()
    endforeach()

    # generate C bindings for LCM types
    set(_lcmtypes_c_dir ${PROJECT_SOURCE_DIR}/lcmtypes/c/lcmtypes)

    # blow away any existing auto-generated files.
    file(REMOVE_RECURSE ${_lcmtypes_c_dir})

    # run lcm-gen now
    execute_process(COMMAND mkdir -p ${_lcmtypes_c_dir})
    lcmgen(--lazy -c --c-cpath ${_lcmtypes_c_dir} --c-hpath ${_lcmtypes_c_dir} --cinclude lcmtypes ${_lcmtypes})

    # run lcm-gen at compile time
    add_custom_target(lcmgen_c ALL 
        COMMAND sh -c '[ -d ${_lcmtypes_c_dir} ] || mkdir -p ${_lcmtypes_c_dir}'
        COMMAND sh -c 'lcm-gen --lazy -c ${_lcmtypes} --c-cpath ${_lcmtypes_c_dir} --c-hpath ${_lcmtypes_c_dir}')

    # get a list of all generated .c and .h files
    file(GLOB _lcmtypes_c_files ${_lcmtypes_c_dir}/*.c)
    file(GLOB _lcmtypes_h_files ${_lcmtypes_c_dir}/*.h)

    include_directories(BEFORE ${PROJECT_SOURCE_DIR}/lcmtypes/c)
    include_directories(${LCM_INCLUDE_DIRS})

    # aggregate into a static library
    add_library(${libname} STATIC ${_lcmtypes_c_files})
    set_source_files_properties(${_lcmtypes_c_files} PROPERTIES COMPILE_FLAGS "-fPIC")
    #    set_target_properties("${libname}-static" PROPERTIES OUTPUT_NAME "${libname}")
    set_target_properties(${libname} PROPERTIES PREFIX "lib")
    set_target_properties(${libname} PROPERTIES CLEAN_DIRECT_OUTPUT 1)
    add_dependencies(${libname} lcmgen_c)

    #    add_library("${libname}-static" STATIC ${_lcmtypes_c_files})
    #    set_source_files_properties(${_lcmtypes_c_files} PROPERTIES COMPILE_FLAGS "-I${PROJECT_SOURCE_DIR}/lcmtypes/c")
    #    set_target_properties("${libname}-static" PROPERTIES OUTPUT_NAME "${libname}")
    #    set_target_properties("${libname}-static" PROPERTIES PREFIX "lib")
    #    set_target_properties("${libname}-static" PROPERTIES CLEAN_DIRECT_OUTPUT 1)
    #    add_dependencies("${libname}-static" lcmgen_c)

    # XXX don't build a shared library, as it makes using 3rd-party/external
    # LCM types awkward (linker will try to link external symbols at library link time, 
    # rather than executable link time)

    #    # aggregate into a shared library
    #    add_library(${libname} SHARED ${_lcmtypes_c_files})
    #    set_target_properties("${libname}" PROPERTIES CLEAN_DIRECT_OUTPUT 1)
    #    add_dependencies("${libname}" lcmgen_c)
    #    target_link_libraries(${libname} ${LCM_LDFLAGS})

    # create a header file aggregating all of the autogenerated .h files
    set(__agg_h_fname "${_lcmtypes_c_dir}/${agg_h_bname}")
    file(WRITE ${__agg_h_fname}
        "#ifndef __lcmtypes_${__sanitized_project_name}_h__\n"
        "#define __lcmtypes_${__sanitized_project_name}_h__\n\n")
    foreach(h_file ${_lcmtypes_h_files})
        file(RELATIVE_PATH __tmp_path ${_lcmtypes_c_dir} ${h_file})
        file(APPEND ${__agg_h_fname} "#include \"${__tmp_path}\"\n")
    endforeach()
    file(APPEND ${__agg_h_fname} "\n#endif\n")
    list(APPEND _lcmtypes_h_files ${__agg_h_fname})
    unset(__sanitized_project_name)
    unset(__agg_h_fname)

    # make header files and libraries public
    #install(TARGETS "${libname}-static" ARCHIVE DESTINATION lib)
    install(TARGETS ${libname} ARCHIVE DESTINATION lib)
    #install(TARGETS "${libname}" LIBRARY DESTINATION lib)
    install(FILES ${_lcmtypes_h_files} DESTINATION include/lcmtypes)

    # set some compilation variables
    set(LCMTYPES_INCLUDE_DIRS ${PROJECT_SOURCE_DIR}/lcmtypes/c PARENT_SCOPE)
    set(LCMTYPES_LIBS ${libname} PARENT_SCOPE)

    # create a pkg-config file
    set(pc_fname "${CMAKE_BINARY_DIR}/lib/pkgconfig/${libname}.pc")
    file(WRITE ${pc_fname}
        "prefix=${CMAKE_INSTALL_PREFIX}\n"
        "exec_prefix=\${prefix}\n"
        "libdir=\${exec_prefix}/lib\n"
        "includedir=\${prefix}/include\n"
        "\n"
        "Name: ${libname}\n"
        "Description: LCM types for ${PROJECT_NAME}\n"
        "Version: 0.0.0\n"
        "Requires: lcm\n"
        "Libs: -L\${exec_prefix}/lib -l${libname}\n")

    # mark the pkg-config file for installation to the lib/pkgconfig directory
    install(FILES ${pc_fname} DESTINATION lib/pkgconfig)

    lcmtypes_add_clean_dir("${PROJECT_SOURCE_DIR}/lcmtypes/c")
endfunction()

function(lcmtypes_build_java)
    lcmtypes_get_types(_lcmtypes)
    list(LENGTH _lcmtypes _num_lcmtypes)
    if(_num_lcmtypes EQUAL 0)
        return()
    endif()

    find_package(Java)
    if(JAVA_COMPILE STREQUAL JAVA_COMPILE-NOTFOUND OR
       JAVA_ARCHIVE STREQUAL JAVA_ARCHIVE-NOTFOUND)
        message(STATUS "Not building Java LCM type bindings (Can't find Java)")
        return()
    endif()

    # generate Java bindings for LCM types
    set(_lcmtypes_java_dir ${PROJECT_SOURCE_DIR}/lcmtypes/java)
    set(auto_manage_files YES)

    set(modewords JAVA_DEST_DIR)
    set(curmode "")
    foreach(word ${ARGV})
        list(FIND modewords ${word} mode_index)
        if(${mode_index} GREATER -1)
            set(curmode ${word})
        elseif(curmode STREQUAL JAVA_DEST_DIR)
            set(_lcmtypes_java_dir "${word}")
            set(auto_manage_files NO)
            set(curmode "")
        endif()
    endforeach()

    # blow away any existing auto-generated files?
    if(auto_manage_files)
        file(REMOVE_RECURSE ${_lcmtypes_java_dir})
    endif()

    # run lcm-gen now
    execute_process(COMMAND mkdir -p ${_lcmtypes_java_dir})
    lcmgen(--lazy -j ${_lcmtypes} --jpath ${_lcmtypes_java_dir})

    # run lcm-gen at compile time
    add_custom_target(lcmgen_java ALL
        COMMAND sh -c '[ -d ${_lcmtypes_java_dir} ] || mkdir -p ${_lcmtypes_java_dir}'
        COMMAND sh -c 'lcm-gen --lazy -j ${_lcmtypes} --jpath ${_lcmtypes_java_dir}')

    if(NOT auto_manage_files)
        return()
    endif()

    # get a list of all generated .java files
    file(GLOB_RECURSE _lcmtypes_java_files ${_lcmtypes_java_dir}/*.java)

    # where is lcm.jar?
    execute_process(COMMAND pkg-config --variable=classpath lcm-java OUTPUT_VARIABLE LCM_JAR_FILE)
    string(STRIP ${LCM_JAR_FILE} LCM_JAR_FILE)
    set(LCMTYPES_JAR ${CMAKE_CURRENT_BINARY_DIR}/lcmtypes_${PROJECT_NAME}.jar)

    set(java_classpath ${_lcmtypes_java_dir}:${LCM_JAR_FILE})

    # search for lcmtypes_*.jar files in well-known places and add them to the
    # classpath
    foreach(pfx /usr /usr/local ${CMAKE_INSTALL_PREFIX})
        file(GLOB_RECURSE jarfiles ${pfx}/share/java/lcmtypes_*.jar)
        foreach(jarfile ${jarfiles})
            set(java_classpath ${java_classpath}:${jarfile})
            #            message("found ${jarfile}")
        endforeach()
    endforeach()

    # convert the list of .java filenames to a list of .class filenames
    foreach(javafile ${_lcmtypes_java_files})
        string(REPLACE .java .class __tmp_class_fname ${javafile})
        #        add_custom_command(OUTPUT ${__tmp_class_fname} COMMAND
        #            ${JAVA_COMPILE} -source 6 -cp ${_lcmtypes_java_dir}:${lcm_jar} ${javafile} VERBATIM DEPENDS ${javafile})
        list(APPEND _lcmtypes_class_files ${__tmp_class_fname})
        unset(__tmp_class_fname)
    endforeach()

    # add a rule to build the .class files from from the .java files
    add_custom_command(OUTPUT ${_lcmtypes_class_files} COMMAND 
        ${JAVA_COMPILE} -source 6 -cp ${java_classpath} ${_lcmtypes_java_files} 
        DEPENDS ${_lcmtypes_java_files} VERBATIM)

    # add a rule to build a .jar file from the .class files
    add_custom_command(OUTPUT lcmtypes_${PROJECT_NAME}.jar COMMAND
        ${JAVA_ARCHIVE} cf ${LCMTYPES_JAR} -C ${_lcmtypes_java_dir} . DEPENDS ${_lcmtypes_class_files} VERBATIM)
    add_custom_target(lcmtypes_${PROJECT_NAME}_jar ALL DEPENDS ${LCMTYPES_JAR})

    add_dependencies(lcmtypes_${PROJECT_NAME}_jar lcmgen_java)

    install(FILES ${LCMTYPES_JAR} DESTINATION share/java)
    set(LCMTYPES_JAR ${LCMTYPES_JAR} PARENT_SCOPE)

    lcmtypes_add_clean_dir(${_lcmtypes_java_dir})
endfunction()

function(lcmtypes_build_python)
    lcmtypes_get_types(_lcmtypes)
    list(LENGTH _lcmtypes _num_lcmtypes)
    if(_num_lcmtypes EQUAL 0)
        return()
    endif()

    find_package(PythonInterp)
    if(NOT PYTHONINTERP_FOUND)
        message(STATUS "Not building Python LCM type bindings (Can't find Python)")
        return()
    endif()

    set(_lcmtypes_python_dir ${PROJECT_SOURCE_DIR}/lcmtypes/python)
    set(auto_manage_files YES)

    set(modewords PY_DEST_DIR)
    set(curmode "")
    foreach(word ${ARGV})
        list(FIND modewords ${word} mode_index)
        if(${mode_index} GREATER -1)
            set(curmode ${word})
        elseif(curmode STREQUAL PY_DEST_DIR)
            set(_lcmtypes_python_dir "${word}")
            set(auto_manage_files NO)
            set(curmode "")
        endif()
    endforeach()

    # purge existing files?
    if(auto_manage_files)
        file(REMOVE_RECURSE ${_lcmtypes_python_dir})
    endif()

    # generate Python bindings for LCM types
    execute_process(COMMAND mkdir -p ${_lcmtypes_python_dir})
    execute_process(COMMAND lcm-gen --lazy -p ${_lcmtypes} --ppath ${_lcmtypes_python_dir})

    # run lcm-gen at compile time
    add_custom_target(lcmgen_python ALL
        COMMAND sh -c 'lcm-gen --lazy -p ${_lcmtypes} --ppath ${_lcmtypes_python_dir}')

    if(NOT auto_manage_files)
        return()
    endif()

    # get a list of all generated .py files
    file(GLOB_RECURSE _lcmtypes_python_files RELATIVE ${_lcmtypes_python_dir} ${_lcmtypes_python_dir}/*.py )

    # add rules for byte-compiling .py --> .pyc
    foreach(py_file ${_lcmtypes_python_files})
        set(full_py_fname ${_lcmtypes_python_dir}/${py_file})
        add_custom_command(OUTPUT "${full_py_fname}c" COMMAND 
            ${PYTHON_EXECUTABLE} -m py_compile ${full_py_fname} DEPENDS ${full_py_fname} VERBATIM)
        list(APPEND pyc_files "${full_py_fname}c")
    endforeach()
    add_custom_target(pyc_files ALL DEPENDS ${pyc_files})

    # install python files
    execute_process(COMMAND 
        ${PYTHON_EXECUTABLE} -c "import sys; sys.stdout.write(sys.version[:3])"
        OUTPUT_VARIABLE pyversion)
    install(DIRECTORY ${_lcmtypes_python_dir}/ DESTINATION lib/python${pyversion}/site-packages)

    lcmtypes_add_clean_dir(${_lcmtypes_python_dir})
endfunction()

function(lcmtypes_install_types)
    lcmtypes_get_types(_lcmtypes)
    list(LENGTH _lcmtypes _num_lcmtypes)
    if(_num_lcmtypes EQUAL 0)
        return()
    endif()

    install(FILES ${_lcmtypes} DESTINATION share/lcmtypes)
endfunction()

macro(lcmtypes_build)
    find_package(PkgConfig REQUIRED)
    pkg_check_modules(LCM REQUIRED lcm)
    lcmtypes_build_c(${ARGV})
    include_directories(${LCMTYPES_INCLUDE_DIRS})

    lcmtypes_build_java(${ARGV})
    lcmtypes_build_python(${ARGV})
    lcmtypes_install_types()
endmacro()


================================================
FILE: data_generation/lcmtypes/cmake/pods.cmake
================================================
# Macros to simplify compliance with the pods build policies.
#
# To enable the macros, add the following lines to CMakeLists.txt:
#   set(POD_NAME <pod-name>)
#   include(cmake/pods.cmake)
#
# If POD_NAME is not set, then the CMake source directory is used as POD_NAME
#
# Next, any of the following macros can be used.  See the individual macro
# definitions in this file for individual documentation.
#
# C/C++
#   pods_install_headers(...)
#   pods_install_libraries(...)
#   pods_install_executables(...)
#   pods_install_pkg_config_file(...)
#
#   pods_use_pkg_config_packages(...)
#
# Python
#   pods_install_python_packages(...)
#   pods_install_python_script(...)
#
# Java
#   None yet
#
# ----
# File: pods.cmake
# Distributed with pods version: 11.02.09

# pods_install_headers(<header1.h> ... DESTINATION <subdir_name>)
# 
# Install a (list) of header files.
#
# Header files will all be installed to include/<subdir_name>
#
# example:
#   add_library(perception detector.h sensor.h)
#   pods_install_headers(detector.h sensor.h DESTINATION perception)
#
function(pods_install_headers)
    list(GET ARGV -2 checkword)
    if(NOT checkword STREQUAL DESTINATION)
        message(FATAL_ERROR "pods_install_headers missing DESTINATION parameter")
    endif()

    list(GET ARGV -1 dest_dir)
    list(REMOVE_AT ARGV -1)
    list(REMOVE_AT ARGV -1)
    #copy the headers to the INCLUDE_OUTPUT_PATH (${CMAKE_BINARY_DIR}/include)
    foreach(header ${ARGV})
        get_filename_component(_header_name ${header} NAME)
        configure_file(${header} ${INCLUDE_OUTPUT_PATH}/${dest_dir}/${_header_name} COPYONLY)
	endforeach(header)
	#mark them to be installed
	install(FILES ${ARGV} DESTINATION include/${dest_dir})


endfunction(pods_install_headers)

# pods_install_executables(<executable1> ...)
#
# Install a (list) of executables to bin/
function(pods_install_executables)
    install(TARGETS ${ARGV} RUNTIME DESTINATION bin)
endfunction(pods_install_executables)

# pods_install_libraries(<library1> ...)
#
# Install a (list) of libraries to lib/
function(pods_install_libraries)
    install(TARGETS ${ARGV} LIBRARY DESTINATION lib ARCHIVE DESTINATION lib)
endfunction(pods_install_libraries)


# pods_install_pkg_config_file(<package-name> 
#                              [VERSION <version>]
#                              [DESCRIPTION <description>]
#                              [CFLAGS <cflag> ...]
#                              [LIBS <lflag> ...]
#                              [REQUIRES <required-package-name> ...])
# 
# Create and install a pkg-config .pc file.
#
# example:
#    add_library(mylib mylib.c)
#    pods_install_pkg_config_file(mylib LIBS -lmylib REQUIRES glib-2.0)
function(pods_install_pkg_config_file)
    list(GET ARGV 0 pc_name)
    # TODO error check

    set(pc_version 0.0.1)
    set(pc_description ${pc_name})
    set(pc_requires "")
    set(pc_libs "")
    set(pc_cflags "")
    set(pc_fname "${PKG_CONFIG_OUTPUT_PATH}/${pc_name}.pc")
    
    set(modewords LIBS CFLAGS REQUIRES VERSION DESCRIPTION)
    set(curmode "")

    # parse function arguments and populate pkg-config parameters
    list(REMOVE_AT ARGV 0)
    foreach(word ${ARGV})
        list(FIND modewords ${word} mode_index)
        if(${mode_index} GREATER -1)
            set(curmode ${word})
        elseif(curmode STREQUAL LIBS)
            set(pc_libs "${pc_libs} ${word}")
        elseif(curmode STREQUAL CFLAGS)
            set(pc_cflags "${pc_cflags} ${word}")
        elseif(curmode STREQUAL REQUIRES)
            set(pc_requires "${pc_requires} ${word}")
        elseif(curmode STREQUAL VERSION)
            set(pc_version ${word})
            set(curmode "")
        elseif(curmode STREQUAL DESCRIPTION)
            set(pc_description "${word}")
            set(curmode "")
        else(${mode_index} GREATER -1)
            message("WARNING incorrect use of pods_add_pkg_config (${word})")
            break()
        endif(${mode_index} GREATER -1)
    endforeach(word)

    # write the .pc file out
    file(WRITE ${pc_fname}
        "prefix=${CMAKE_INSTALL_PREFIX}\n"
        "exec_prefix=\${prefix}\n"
        "libdir=\${exec_prefix}/lib\n"
        "includedir=\${prefix}/include\n"
        "\n"
        "Name: ${pc_name}\n"
        "Description: ${pc_description}\n"
        "Requires: ${pc_requires}\n"
        "Version: ${pc_version}\n"
        "Libs: -L\${exec_prefix}/lib ${pc_libs}\n"
        "Cflags: ${pc_cflags}\n")

    # mark the .pc file for installation to the lib/pkgconfig directory
    install(FILES ${pc_fname} DESTINATION lib/pkgconfig)
    
    # find targets that this pkg-config file depends on
    string(REPLACE " " ";" split_lib ${pc_libs})
    foreach(lib ${split_lib})
        string(REGEX REPLACE "^-l" "" libname ${lib})
        get_target_property(IS_TARGET ${libname} LOCATION)
        if (NOT IS_TARGET STREQUAL "IS_TARGET-NOTFOUND")
            set_property(GLOBAL APPEND PROPERTY "PODS_PKG_CONFIG_TARGETS-${pc_name}" ${libname})
        endif() 
    endforeach()
    
endfunction(pods_install_pkg_config_file)


# pods_install_python_script(<script_name> <python_module>)
#
# Create and install a script that invokes the python interpreter with a
# specified module.
#
# A script will be installed to bin/<script_name>.  The script simply
# adds <install-prefix>/lib/pythonX.Y/site-packages to the python path, and
# then invokes `python -m <python_module>`.
#
# example:
#    pods_install_python_script(run-pdb pdb)
function(pods_install_python_script script_name py_module)
    find_package(PythonInterp REQUIRED)

    # which python version?
    execute_process(COMMAND 
        ${PYTHON_EXECUTABLE} -c "import sys; sys.stdout.write(sys.version[:3])"
        OUTPUT_VARIABLE pyversion)

    # where do we install .py files to?
    set(python_install_dir 
        ${CMAKE_INSTALL_PREFIX}/lib/python${pyversion}/site-packages)

    # write the script file
    file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${script_name} "#!/bin/sh\n"
        "export PYTHONPATH=${python_install_dir}:\${PYTHONPATH}\n"
        "exec ${PYTHON_EXECUTABLE} -m ${py_module} $*\n")

    # install it...
    install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${script_name} DESTINATION bin)
endfunction()

# pods_install_python_packages(<src_dir>)
#
# Install python packages to lib/pythonX.Y/site-packages, where X.Y refers to
# the current python version (e.g., 2.6)
#
# Recursively searches <src_dir> for .py files, byte-compiles them, and
# installs them
function(pods_install_python_packages py_src_dir)
    find_package(PythonInterp REQUIRED)

    # which python version?
    execute_process(COMMAND 
        ${PYTHON_EXECUTABLE} -c "import sys; sys.stdout.write(sys.version[:3])"
        OUTPUT_VARIABLE pyversion)

    # where do we install .py files to?
    set(python_install_dir 
        ${CMAKE_INSTALL_PREFIX}/lib/python${pyversion}/site-packages)

    if(ARGC GREATER 1)
        message(FATAL_ERROR "NYI")
    else()
        # get a list of all .py files
        file(GLOB_RECURSE py_files RELATIVE ${py_src_dir} ${py_src_dir}/*.py)

        # add rules for byte-compiling .py --> .pyc
        foreach(py_file ${py_files})
            get_filename_component(py_dirname ${py_file} PATH)
            add_custom_command(OUTPUT "${py_src_dir}/${py_file}c" 
                COMMAND ${PYTHON_EXECUTABLE} -m py_compile ${py_src_dir}/${py_file} 
                DEPENDS ${py_src_dir}/${py_file})
            list(APPEND pyc_files "${py_src_dir}/${py_file}c")

            # install python file and byte-compiled file
            install(FILES ${py_src_dir}/${py_file} ${py_src_dir}/${py_file}c
                DESTINATION "${python_install_dir}/${py_dirname}")
#            message("${py_src_dir}/${py_file} -> ${python_install_dir}/${py_dirname}")
        endforeach()
        string(REGEX REPLACE "[^a-zA-Z0-9]" "_" san_src_dir "${py_src_dir}")
        add_custom_target("pyc_${san_src_dir}" ALL DEPENDS ${pyc_files})
    endif()
endfunction()


# pods_use_pkg_config_packages(<target> <package-name> ...)
#
# Convenience macro to get compiler and linker flags from pkg-config and apply them
# to the specified target.
#
# Invokes `pkg-config --cflags-only-I <package-name> ...` and adds the result to the
# include directories.
#
# Additionally, invokes `pkg-config --libs <package-name> ...` and adds the result to
# the target's link flags (via target_link_libraries)
#
# example:
#   add_executable(myprogram main.c)
#   pods_use_pkg_config_packages(myprogram glib-2.0 opencv)
macro(pods_use_pkg_config_packages target)
    if(${ARGC} LESS 2)
        message(WARNING "Useless invocation of pods_use_pkg_config_packages")
        return()
    endif()
    find_package(PkgConfig REQUIRED)
    execute_process(COMMAND 
        ${PKG_CONFIG_EXECUTABLE} --cflags-only-I ${ARGN}
        OUTPUT_VARIABLE _pods_pkg_include_flags)
    string(STRIP ${_pods_pkg_include_flags} _pods_pkg_include_flags)
    string(REPLACE "-I" "" _pods_pkg_include_flags "${_pods_pkg_include_flags}")
	separate_arguments(_pods_pkg_include_flags)
    #    message("include: ${_pods_pkg_include_flags}")
    execute_process(COMMAND 
        ${PKG_CONFIG_EXECUTABLE} --libs ${ARGN}
        OUTPUT_VARIABLE _pods_pkg_ldflags)
    string(STRIP ${_pods_pkg_ldflags} _pods_pkg_ldflags)
    #    message("ldflags: ${_pods_pkg_ldflags}")
    include_directories(${_pods_pkg_include_flags})
    target_link_libraries(${target} ${_pods_pkg_ldflags})
   
    # make the target depend on libraries being installed by this source build
    foreach(_pkg ${ARGN})
        get_property(_has_dependencies GLOBAL PROPERTY "PODS_PKG_CONFIG_TARGETS-${_pkg}" SET)
        if(_has_dependencies)
            get_property(_dependencies GLOBAL PROPERTY "PODS_PKG_CONFIG_TARGETS-${_pkg}")
            add_dependencies(${target} ${_dependencies})
            #            message("Found dependencies for ${_pkg}: ${dependencies}")
        endif()
        unset(_has_dependencies)
        unset(_dependencies)
    endforeach()

    unset(_pods_pkg_include_flags)
    unset(_pods_pkg_ldflags)
endmacro()


# pods_config_search_paths()
#
# Setup include, linker, and pkg-config paths according to the pods core
# policy.  This macro is automatically invoked, there is no need to do so
# manually.
macro(pods_config_search_paths)
    if(NOT DEFINED __pods_setup)
		#set where files should be output locally
	    set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib)
	    set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
	    set(INCLUDE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/include)
	    set(PKG_CONFIG_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib/pkgconfig)
		
		#set where files should be installed to
	    set(LIBRARY_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/lib)
	    set(EXECUTABLE_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/bin)
	    set(INCLUDE_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/include)
	    set(PKG_CONFIG_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig)


        # add build/lib/pkgconfig to the pkg-config search path
        set(ENV{PKG_CONFIG_PATH} ${PKG_CONFIG_INSTALL_PATH}:$ENV{PKG_CONFIG_PATH})
        set(ENV{PKG_CONFIG_PATH} ${PKG_CONFIG_OUTPUT_PATH}:$ENV{PKG_CONFIG_PATH})

        # add build/include to the compiler include path
        include_directories(BEFORE ${INCLUDE_OUTPUT_PATH})
        include_directories(${INCLUDE_INSTALL_PATH})

        # add build/lib to the link path
        link_directories(${LIBRARY_INSTALL_PATH})
        link_directories(${LIBRARY_OUTPUT_PATH})

        # abuse RPATH
        if(${CMAKE_INSTALL_RPATH})
            set(CMAKE_INSTALL_RPATH ${LIBRARY_INSTALL_PATH}:${CMAKE_INSTALL_RPATH})
        else(${CMAKE_INSTALL_RPATH})
            set(CMAKE_INSTALL_RPATH ${LIBRARY_INSTALL_PATH})
        endif(${CMAKE_INSTALL_RPATH})

        # for osx, which uses "install name" path rather than rpath
        #set(CMAKE_INSTALL_NAME_DIR ${LIBRARY_OUTPUT_PATH})
        set(CMAKE_INSTALL_NAME_DIR ${CMAKE_INSTALL_RPATH})
        
        # hack to force cmake always create install and clean targets 
        install(FILES DESTINATION)
        add_custom_target(tmp)

        set(__pods_setup true)
    endif(NOT DEFINED __pods_setup)
endmacro(pods_config_search_paths)

macro(enforce_out_of_source)
    if(CMAKE_BINARY_DIR STREQUAL PROJECT_SOURCE_DIR)
      message(FATAL_ERROR 
      "\n
      Do not run cmake directly in the pod directory. 
      use the supplied Makefile instead!  You now need to
      remove CMakeCache.txt and the CMakeFiles directory.

      Then to build, simply type: 
       $ make
      ")
    endif()
endmacro(enforce_out_of_source)

#set the variable POD_NAME to the directory path, and set the cmake PROJECT_NAME
if(NOT POD_NAME)
    get_filename_component(POD_NAME ${CMAKE_SOURCE_DIR} NAME)
    message(STATUS "POD_NAME is not set... Defaulting to directory name: ${POD_NAME}") 
endif(NOT POD_NAME)
project(${POD_NAME})

#make sure we're running an out-of-source build
enforce_out_of_source()

#call the function to setup paths
pods_config_search_paths()


================================================
FILE: data_generation/lcmtypes/lcmtypes/c/lcmtypes/lcmtypes.h
================================================
#ifndef __lcmtypes_lcmtypes_h__
#define __lcmtypes_lcmtypes_h__

#include "lcmtypes_trajectory_t.h"
#include "lcmtypes_state_t.h"
#include "lcmtypes_environment_t.h"
#include "lcmtypes_vertex_t.h"
#include "lcmtypes_graph_t.h"
#include "lcmtypes_edge_t.h"
#include "lcmtypes_region_3d_t.h"

#endif


================================================
FILE: data_generation/lcmtypes/lcmtypes/c/lcmtypes/lcmtypes_edge_t.c
================================================
// THIS IS AN AUTOMATICALLY GENERATED FILE.  DO NOT MODIFY
// BY HAND!!
//
// Generated by lcm-gen

#include <string.h>
#include "lcmtypes/lcmtypes_edge_t.h"

static int __lcmtypes_edge_t_hash_computed;
static uint64_t __lcmtypes_edge_t_hash;

uint64_t __lcmtypes_edge_t_hash_recursive(const __lcm_hash_ptr *p)
{
    const __lcm_hash_ptr *fp;
    for (fp = p; fp != NULL; fp = fp->parent)
        if (fp->v == __lcmtypes_edge_t_get_hash)
            return 0;

    __lcm_hash_ptr cp;
    cp.parent =  p;
    cp.v = (void*)__lcmtypes_edge_t_get_hash;
    (void) cp;

    uint64_t hash = (uint64_t)0x1fae492d71eedf94LL
         + __lcmtypes_vertex_t_hash_recursive(&cp)
         + __lcmtypes_vertex_t_hash_recursive(&cp)
         + __lcmtypes_trajectory_t_hash_recursive(&cp)
        ;

    return (hash<<1) + ((hash>>63)&1);
}

int64_t __lcmtypes_edge_t_get_hash(void)
{
    if (!__lcmtypes_edge_t_hash_computed) {
        __lcmtypes_edge_t_hash = (int64_t)__lcmtypes_edge_t_hash_recursive(NULL);
        __lcmtypes_edge_t_hash_computed = 1;
    }

    return __lcmtypes_edge_t_hash;
}

int __lcmtypes_edge_t_encode_array(void *buf, int offset, int maxlen, const lcmtypes_edge_t *p, int elements)
{
    int pos = 0, element;
    int thislen;

    for (element = 0; element < elements; element++) {

        thislen = __lcmtypes_vertex_t_encode_array(buf, offset + pos, maxlen - pos, &(p[element].vertex_src), 1);
        if (thislen < 0) return thislen; else pos += thislen;

        thislen = __lcmtypes_vertex_t_encode_array(buf, offset + pos, maxlen - pos, &(p[element].vertex_dst), 1);
        if (thislen < 0) return thislen; else pos += thislen;

        thislen = __lcmtypes_trajectory_t_encode_array(buf, offset + pos, maxlen - pos, &(p[element].trajectory), 1);
        if (thislen < 0) return thislen; else pos += thislen;

    }
    return pos;
}

int lcmtypes_edge_t_encode(void *buf, int offset, int maxlen, const lcmtypes_edge_t *p)
{
    int pos = 0, thislen;
    int64_t hash = __lcmtypes_edge_t_get_hash();

    thislen = __int64_t_encode_array(buf, offset + pos, maxlen - pos, &hash, 1);
    if (thislen < 0) return thislen; else pos += thislen;

    thislen = __lcmtypes_edge_t_encode_array(buf, offset + pos, maxlen - pos, p, 1);
    if (thislen < 0) return thislen; else pos += thislen;

    return pos;
}

int __lcmtypes_edge_t_encoded_array_size(const lcmtypes_edge_t *p, int elements)
{
    int size = 0, element;
    for (element = 0; element < elements; element++) {

        size += __lcmtypes_vertex_t_encoded_array_size(&(p[element].vertex_src), 1);

        size += __lcmtypes_vertex_t_encoded_array_size(&(p[element].vertex_dst), 1);

        size += __lcmtypes_trajectory_t_encoded_array_size(&(p[element].trajectory), 1);

    }
    return size;
}

int lcmtypes_edge_t_encoded_size(const lcmtypes_edge_t *p)
{
    return 8 + __lcmtypes_edge_t_encoded_array_size(p, 1);
}

int __lcmtypes_edge_t_decode_array(const void *buf, int offset, int maxlen, lcmtypes_edge_t *p, int elements)
{
    int pos = 0, thislen, element;

    for (element = 0; element < elements; element++) {

        thislen = __lcmtypes_vertex_t_decode_array(buf, offset + pos, maxlen - pos, &(p[element].vertex_src), 1);
        if (thislen < 0) return thislen; else pos += thislen;

        thislen = __lcmtypes_vertex_t_decode_array(buf, offset + pos, maxlen - pos, &(p[element].vertex_dst), 1);
        if (thislen < 0) return thislen; else pos += thislen;

        thislen = __lcmtypes_trajectory_t_decode_array(buf, offset + pos, maxlen - pos, &(p[element].trajectory), 1);
        if (thislen < 0) return thislen; else pos += thislen;

    }
    return pos;
}

int __lcmtypes_edge_t_decode_array_cleanup(lcmtypes_edge_t *p, int elements)
{
    int element;
    for (element = 0; element < elements; element++) {

        __lcmtypes_vertex_t_decode_array_cleanup(&(p[element].vertex_src), 1);

        __lcmtypes_vertex_t_decode_array_cleanup(&(p[element].vertex_dst), 1);

        __lcmtypes_trajectory_t_decode_array_cleanup(&(p[element].trajectory), 1);

    }
    return 0;
}

int lcmtypes_edge_t_decode(const void *buf, int offset, int maxlen, lcmtypes_edge_t *p)
{
    int pos = 0, thislen;
    int64_t hash = __lcmtypes_edge_t_get_hash();

    int64_t this_hash;
    thislen = __int64_t_decode_array(buf, offset + pos, maxlen - pos, &this_hash, 1);
    if (thislen < 0) return thislen; else pos += thislen;
    if (this_hash != hash) return -1;

    thislen = __lcmtypes_edge_t_decode_array(buf, offset + pos, maxlen - pos, p, 1);
    if (thislen < 0) return thislen; else pos += thislen;

    return pos;
}

int lcmtypes_edge_t_decode_cleanup(lcmtypes_edge_t *p)
{
    return __lcmtypes_edge_t_decode_array_cleanup(p, 1);
}

int __lcmtypes_edge_t_clone_array(const lcmtypes_edge_t *p, lcmtypes_edge_t *q, int elements)
{
    int element;
    for (element = 0; element < elements; element++) {

        __lcmtypes_vertex_t_clone_array(&(p[element].vertex_src), &(q[element].vertex_src), 1);

        __lcmtypes_vertex_t_clone_array(&(p[element].vertex_dst), &(q[element].vertex_dst), 1);

        __lcmtypes_trajectory_t_clone_array(&(p[element].trajectory), &(q[element].trajectory), 1);

    }
    return 0;
}

lcmtypes_edge_t *lcmtypes_edge_t_copy(const lcmtypes_edge_t *p)
{
    lcmtypes_edge_t *q = (lcmtypes_edge_t*) malloc(sizeof(lcmtypes_edge_t));
    __lcmtypes_edge_t_clone_array(p, q, 1);
    return q;
}

void lcmtypes_edge_t_destroy(lcmtypes_edge_t *p)
{
    __lcmtypes_edge_t_decode_array_cleanup(p, 1);
    free(p);
}

int lcmtypes_edge_t_publish(lcm_t *lc, const char *channel, const lcmtypes_edge_t *p)
{
      int max_data_size = lcmtypes_edge_t_encoded_size (p);
      uint8_t *buf = (uint8_t*) malloc (max_data_size);
      if (!buf) return -1;
      int data_size = lcmtypes_edge_t_encode (buf, 0, max_data_size, p);
      if (data_size < 0) {
          free (buf);
          return data_size;
      }
      int status = lcm_publish (lc, channel, buf, data_size);
      free (buf);
      return status;
}

struct _lcmtypes_edge_t_subscription_t {
    lcmtypes_edge_t_handler_t user_handler;
    void *userdata;
    lcm_subscription_t *lc_h;
};
static
void lcmtypes_edge_t_handler_stub (const lcm_recv_buf_t *rbuf,
                            const char *channel, void *userdata)
{
    int status;
    lcmtypes_edge_t p;
    memset(&p, 0, sizeof(lcmtypes_edge_t));
    status = lcmtypes_edge_t_decode (rbuf->data, 0, rbuf->data_size, &p);
    if (status < 0) {
        fprintf (stderr, "error %d decoding lcmtypes_edge_t!!!\n", status);
        return;
    }

    lcmtypes_edge_t_subscription_t *h = (lcmtypes_edge_t_subscription_t*) userdata;
    h->user_handler (rbuf, channel, &p, h->userdata);

    lcmtypes_edge_t_decode_cleanup (&p);
}

lcmtypes_edge_t_subscription_t* lcmtypes_edge_t_subscribe (lcm_t *lcm,
                    const char *channel,
                    lcmtypes_edge_t_handler_t f, void *userdata)
{
    lcmtypes_edge_t_subscription_t *n = (lcmtypes_edge_t_subscription_t*)
                       malloc(sizeof(lcmtypes_edge_t_subscription_t));
    n->user_handler = f;
    n->userdata = userdata;
    n->lc_h = lcm_subscribe (lcm, channel,
                                 lcmtypes_edge_t_handler_stub, n);
    if (n->lc_h == NULL) {
        fprintf (stderr,"couldn't reg lcmtypes_edge_t LCM handler!\n");
        free (n);
        return NULL;
    }
    return n;
}

int lcmtypes_edge_t_subscription_set_queue_capacity (lcmtypes_edge_t_subscription_t* subs,
                              int num_messages)
{
    return lcm_subscription_set_queue_capacity (subs->lc_h, num_messages);
}

int lcmtypes_edge_t_unsubscribe(lcm_t *lcm, lcmtypes_edge_t_subscription_t* hid)
{
    int status = lcm_unsubscribe (lcm, hid->lc_h);
    if (0 != status) {
        fprintf(stderr,
           "couldn't unsubscribe lcmtypes_edge_t_handler %p!\n", hid);
        return -1;
    }
    free (hid);
    return 0;
}



================================================
FILE: data_generation/lcmtypes/lcmtypes/c/lcmtypes/lcmtypes_edge_t.h
================================================
// THIS IS AN AUTOMATICALLY GENERATED FILE.  DO NOT MODIFY
// BY HAND!!
//
// Generated by lcm-gen

#include <stdint.h>
#include <stdlib.h>
#include <lcm/lcm_coretypes.h>
#include <lcm/lcm.h>

#ifndef _lcmtypes_edge_t_h
#define _lcmtypes_edge_t_h

#ifdef __cplusplus
extern "C" {
#endif

#include "lcmtypes/lcmtypes_vertex_t.h"
#include "lcmtypes/lcmtypes_vertex_t.h"
#include "lcmtypes/lcmtypes_trajectory_t.h"
typedef struct _lcmtypes_edge_t lcmtypes_edge_t;
struct _lcmtypes_edge_t
{
    lcmtypes_vertex_t vertex_src;
    lcmtypes_vertex_t vertex_dst;
    lcmtypes_trajectory_t trajectory;
};

/**
 * Create a deep copy of a lcmtypes_edge_t.
 * When no longer needed, destroy it with lcmtypes_edge_t_destroy()
 */
lcmtypes_edge_t* lcmtypes_edge_t_copy(const lcmtypes_edge_t* to_copy);

/**
 * Destroy an instance of lcmtypes_edge_t created by lcmtypes_edge_t_copy()
 */
void lcmtypes_edge_t_destroy(lcmtypes_edge_t* to_destroy);

/**
 * Identifies a single subscription.  This is an opaque data type.
 */
typedef struct _lcmtypes_edge_t_subscription_t lcmtypes_edge_t_subscription_t;

/**
 * Prototype for a callback function invoked when a message of type
 * lcmtypes_edge_t is received.
 */
typedef void(*lcmtypes_edge_t_handler_t)(const lcm_recv_buf_t *rbuf,
             const char *channel, const lcmtypes_edge_t *msg, void *userdata);

/**
 * Publish a message of type lcmtypes_edge_t using LCM.
 *
 * @param lcm The LCM instance to publish with.
 * @param channel The channel to publish on.
 * @param msg The message to publish.
 * @return 0 on success, <0 on error.  Success means LCM has transferred
 * responsibility of the message data to the OS.
 */
int lcmtypes_edge_t_publish(lcm_t *lcm, const char *channel, const lcmtypes_edge_t *msg);

/**
 * Subscribe to messages of type lcmtypes_edge_t using LCM.
 *
 * @param lcm The LCM instance to subscribe with.
 * @param channel The channel to subscribe to.
 * @param handler The callback function invoked by LCM when a message is received.
 *                This function is invoked by LCM during calls to lcm_handle() and
 *                lcm_handle_timeout().
 * @param userdata An opaque pointer passed to @p handler when it is invoked.
 * @return 0 on success, <0 if an error occured
 */
lcmtypes_edge_t_subscription_t* lcmtypes_edge_t_subscribe(lcm_t *lcm, const char *channel, lcmtypes_edge_t_handler_t handler, void *userdata);

/**
 * Removes and destroys a subscription created by lcmtypes_edge_t_subscribe()
 */
int lcmtypes_edge_t_unsubscribe(lcm_t *lcm, lcmtypes_edge_t_subscription_t* hid);

/**
 * Sets the queue capacity for a subscription.
 * Some LCM providers (e.g., the default multicast provider) are implemented
 * using a background receive thread that constantly revceives messages from
 * the network.  As these messages are received, they are buffered on
 * per-subscription queues until dispatched by lcm_handle().  This function
 * how many messages are queued before dropping messages.
 *
 * @param subs the subscription to modify.
 * @param num_messages The maximum number of messages to queue
 *  on the subscription.
 * @return 0 on success, <0 if an error occured
 */
int lcmtypes_edge_t_subscription_set_queue_capacity(lcmtypes_edge_t_subscription_t* subs,
                              int num_messages);

/**
 * Encode a message of type lcmtypes_edge_t into binary form.
 *
 * @param buf The output buffer.
 * @param offset Encoding starts at this byte offset into @p buf.
 * @param maxlen Maximum number of bytes to write.  This should generally
 *               be equal to lcmtypes_edge_t_encoded_size().
 * @param msg The message to encode.
 * @return The number of bytes encoded, or <0 if an error occured.
 */
int lcmtypes_edge_t_encode(void *buf, int offset, int maxlen, const lcmtypes_edge_t *p);

/**
 * Decode a message of type lcmtypes_edge_t from binary form.
 * When decoding messages containing strings or variable-length arrays, this
 * function may allocate memory.  When finished with the decoded message,
 * release allocated resources with lcmtypes_edge_t_decode_cleanup().
 *
 * @param buf The buffer containing the encoded message
 * @param offset The byte offset into @p buf where the encoded message starts.
 * @param maxlen The maximum number of bytes to read while decoding.
 * @param msg Output parameter where the decoded message is stored
 * @return The number of bytes decoded, or <0 if an error occured.
 */
int lcmtypes_edge_t_decode(const void *buf, int offset, int maxlen, lcmtypes_edge_t *msg);

/**
 * Release resources allocated by lcmtypes_edge_t_decode()
 * @return 0
 */
int lcmtypes_edge_t_decode_cleanup(lcmtypes_edge_t *p);

/**
 * Check how many bytes are required to encode a message of type lcmtypes_edge_t
 */
int lcmtypes_edge_t_encoded_size(const lcmtypes_edge_t *p);

// LCM support functions. Users should not call these
int64_t __lcmtypes_edge_t_get_hash(void);
uint64_t __lcmtypes_edge_t_hash_recursive(const __lcm_hash_ptr *p);
int     __lcmtypes_edge_t_encode_array(void *buf, int offset, int maxlen, const lcmtypes_edge_t *p, int elements);
int     __lcmtypes_edge_t_decode_array(const void *buf, int offset, int maxlen, lcmtypes_edge_t *p, int elements);
int     __lcmtypes_edge_t_decode_array_cleanup(lcmtypes_edge_t *p, int elements);
int     __lcmtypes_edge_t_encoded_array_size(const lcmtypes_edge_t *p, int elements);
int     __lcmtypes_edge_t_clone_array(const lcmtypes_edge_t *p, lcmtypes_edge_t *q, int elements);

#ifdef __cplusplus
}
#endif

#endif


================================================
FILE: data_generation/lcmtypes/lcmtypes/c/lcmtypes/lcmtypes_environment_t.c
================================================
// THIS IS AN AUTOMATICALLY GENERATED FILE.  DO NOT MODIFY
// BY HAND!!
//
// Generated by lcm-gen

#include <string.h>
#include "lcmtypes/lcmtypes_environment_t.h"

static int __lcmtypes_environment_t_hash_computed;
static uint64_t __lcmtypes_environment_t_hash;

uint64_t __lcmtypes_environment_t_hash_recursive(const __lcm_hash_ptr *p)
{
    const __lcm_hash_ptr *fp;
    for (fp = p; fp != NULL; fp = fp->parent)
        if (fp->v == __lcmtypes_environment_t_get_hash)
            return 0;

    __lcm_hash_ptr cp;
    cp.parent =  p;
    cp.v = (void*)__lcmtypes_environment_t_get_hash;
    (void) cp;

    uint64_t hash = (uint64_t)0x8caabc2a2ba0f9c7LL
         + __lcmtypes_region_3d_t_hash_recursive(&cp)
         + __lcmtypes_region_3d_t_hash_recursive(&cp)
         + __int32_t_hash_recursive(&cp)
         + __lcmtypes_region_3d_t_hash_recursive(&cp)
        ;

    return (hash<<1) + ((hash>>63)&1);
}

int64_t __lcmtypes_environment_t_get_hash(void)
{
    if (!__lcmtypes_environment_t_hash_computed) {
        __lcmtypes_environment_t_hash = (int64_t)__lcmtypes_environment_t_hash_recursive(NULL);
        __lcmtypes_environment_t_hash_computed = 1;
    }

    return __lcmtypes_environment_t_hash;
}

int __lcmtypes_environment_t_encode_array(void *buf, int offset, int maxlen, const lcmtypes_environment_t *p, int elements)
{
    int pos = 0, element;
    int thislen;

    for (element = 0; element < elements; element++) {

        thislen = __lcmtypes_region_3d_t_encode_array(buf, offset + pos, maxlen - pos, &(p[element].operating), 1);
        if (thislen < 0) return thislen; else pos += thislen;

        thislen = __lcmtypes_region_3d_t_encode_array(buf, offset + pos, maxlen - pos, &(p[element].goal), 1);
        if (thislen < 0) return thislen; else pos += thislen;

        thislen = __int32_t_encode_array(buf, offset + pos, maxlen - pos, &(p[element].num_obstacles), 1);
        if (thislen < 0) return thislen; else pos += thislen;

        thislen = __lcmtypes_region_3d_t_encode_array(buf, offset + pos, maxlen - pos, p[element].obstacles, p[element].num_obstacles);
        if (thislen < 0) return thislen; else pos += thislen;

    }
    return pos;
}

int lcmtypes_environment_t_encode(void *buf, int offset, int maxlen, const lcmtypes_environment_t *p)
{
    int pos = 0, thislen;
    int64_t hash = __lcmtypes_environment_t_get_hash();

    thislen = __int64_t_encode_array(buf, offset + pos, maxlen - pos, &hash, 1);
    if (thislen < 0) return thislen; else pos += thislen;

    thislen = __lcmtypes_environment_t_encode_array(buf, offset + pos, maxlen - pos, p, 1);
    if (thislen < 0) return thislen; else pos += thislen;

    return pos;
}

int __lcmtypes_environment_t_encoded_array_size(const lcmtypes_environment_t *p, int elements)
{
    int size = 0, element;
    for (element = 0; element < elements; element++) {

        size += __lcmtypes_region_3d_t_encoded_array_size(&(p[element].operating), 1);

        size += __lcmtypes_region_3d_t_encoded_array_size(&(p[element].goal), 1);

        size += __int32_t_encoded_array_size(&(p[element].num_obstacles), 1);

        size += __lcmtypes_region_3d_t_encoded_array_size(p[element].obstacles, p[element].num_obstacles);

    }
    return size;
}

int lcmtypes_environment_t_encoded_size(const lcmtypes_environment_t *p)
{
    return 8 + __lcmtypes_environment_t_encoded_array_size(p, 1);
}

int __lcmtypes_environment_t_decode_array(const void *buf, int offset, int maxlen, lcmtypes_environment_t *p, int elements)
{
    int pos = 0, thislen, element;

    for (element = 0; element < elements; element++) {

        thislen = __lcmtypes_region_3d_t_decode_array(buf, offset + pos, maxlen - pos, &(p[element].operating), 1);
        if (thislen < 0) return thislen; else pos += thislen;

        thislen = __lcmtypes_region_3d_t_decode_array(buf, offset + pos, maxlen - pos, &(p[element].goal), 1);
        if (thislen < 0) return thislen; else pos += thislen;

        thislen = __int32_t_decode_array(buf, offset + pos, maxlen - pos, &(p[element].num_obstacles), 1);
        if (thislen < 0) return thislen; else pos += thislen;

        p[element].obstacles = (lcmtypes_region_3d_t*) lcm_malloc(sizeof(lcmtypes_region_3d_t) * p[element].num_obstacles);
        thislen = __lcmtypes_region_3d_t_decode_array(buf, offset + pos, maxlen - pos, p[element].obstacles, p[element].num_obstacles);
        if (thislen < 0) return thislen; else pos += thislen;

    }
    return pos;
}

int __lcmtypes_environment_t_decode_array_cleanup(lcmtypes_environment_t *p, int elements)
{
    int element;
    for (element = 0; element < elements; element++) {

        __lcmtypes_region_3d_t_decode_array_cleanup(&(p[element].operating), 1);

        __lcmtypes_region_3d_t_decode_array_cleanup(&(p[element].goal), 1);

        __int32_t_decode_array_cleanup(&(p[element].num_obstacles), 1);

        __lcmtypes_region_3d_t_decode_array_cleanup(p[element].obstacles, p[element].num_obstacles);
        if (p[element].obstacles) free(p[element].obstacles);

    }
    return 0;
}

int lcmtypes_environment_t_decode(const void *buf, int offset, int maxlen, lcmtypes_environment_t *p)
{
    int pos = 0, thislen;
    int64_t hash = __lcmtypes_environment_t_get_hash();

    int64_t this_hash;
    thislen = __int64_t_decode_array(buf, offset + pos, maxlen - pos, &this_hash, 1);
    if (thislen < 0) return thislen; else pos += thislen;
    if (this_hash != hash) return -1;

    thislen = __lcmtypes_environment_t_decode_array(buf, offset + pos, maxlen - pos, p, 1);
    if (thislen < 0) return thislen; else pos += thislen;

    return pos;
}

int lcmtypes_environment_t_decode_cleanup(lcmtypes_environment_t *p)
{
    return __lcmtypes_environment_t_decode_array_cleanup(p, 1);
}

int __lcmtypes_environment_t_clone_array(const lcmtypes_environment_t *p, lcmtypes_environment_t *q, int elements)
{
    int element;
    for (element = 0; element < elements; element++) {

        __lcmtypes_region_3d_t_clone_array(&(p[element].operating), &(q[element].operating), 1);

        __lcmtypes_region_3d_t_clone_array(&(p[element].goal), &(q[element].goal), 1);

        __int32_t_clone_array(&(p[element].num_obstacles), &(q[element].num_obstacles), 1);

        q[element].obstacles = (lcmtypes_region_3d_t*) lcm_malloc(sizeof(lcmtypes_region_3d_t) * q[element].num_obstacles);
        __lcmtypes_region_3d_t_clone_array(p[element].obstacles, q[element].obstacles, p[element].num_obstacles);

    }
    return 0;
}

lcmtypes_environment_t *lcmtypes_environment_t_copy(const lcmtypes_environment_t *p)
{
    lcmtypes_environment_t *q = (lcmtypes_environment_t*) malloc(sizeof(lcmtypes_environment_t));
    __lcmtypes_environment_t_clone_array(p, q, 1);
    return q;
}

void lcmtypes_environment_t_destroy(lcmtypes_environment_t *p)
{
    __lcmtypes_environment_t_decode_array_cleanup(p, 1);
    free(p);
}

int lcmtypes_environment_t_publish(lcm_t *lc, const char *channel, const lcmtypes_environment_t *p)
{
      int max_data_size = lcmtypes_environment_t_encoded_size (p);
      uint8_t *buf = (uint8_t*) malloc (max_data_size);
      if (!buf) return -1;
      int data_size = lcmtypes_environment_t_encode (buf, 0, max_data_size, p);
      if (data_size < 0) {
          free (buf);
          return data_size;
      }
      int status = lcm_publish (lc, channel, buf, data_size);
      free (buf);
      return status;
}

struct _lcmtypes_environment_t_subscription_t {
    lcmtypes_environment_t_handler_t user_handler;
    void *userdata;
    lcm_subscription_t *lc_h;
};
static
void lcmtypes_environment_t_handler_stub (const lcm_recv_buf_t *rbuf,
                            const char *channel, void *userdata)
{
    int status;
    lcmtypes_environment_t p;
    memset(&p, 0, sizeof(lcmtypes_environment_t));
    status = lcmtypes_environment_t_decode (rbuf->data, 0, rbuf->data_size, &p);
    if (status < 0) {
        fprintf (stderr, "error %d decoding lcmtypes_environment_t!!!\n", status);
        return;
    }

    lcmtypes_environment_t_subscription_t *h = (lcmtypes_environment_t_subscription_t*) userdata;
    h->user_handler (rbuf, channel, &p, h->userdata);

    lcmtypes_environment_t_decode_cleanup (&p);
}

lcmtypes_environment_t_subscription_t* lcmtypes_environment_t_subscribe (lcm_t *lcm,
                    const char *channel,
                    lcmtypes_environment_t_handler_t f, void *userdata)
{
    lcmtypes_environment_t_subscription_t *n = (lcmtypes_environment_t_subscription_t*)
                       malloc(sizeof(lcmtypes_environment_t_subscription_t));
    n->user_handler = f;
    n->userdata = userdata;
    n->lc_h = lcm_subscribe (lcm, channel,
                                 lcmtypes_environment_t_handler_stub, n);
    if (n->lc_h == NULL) {
        fprintf (stderr,"couldn't reg lcmtypes_environment_t LCM handler!\n");
        free (n);
        return NULL;
    }
    return n;
}

int lcmtypes_environment_t_subscription_set_queue_capacity (lcmtypes_environment_t_subscription_t* subs,
                              int num_messages)
{
    return lcm_subscription_set_queue_capacity (subs->lc_h, num_messages);
}

int lcmtypes_environment_t_unsubscribe(lcm_t *lcm, lcmtypes_environment_t_subscription_t* hid)
{
    int status = lcm_unsubscribe (lcm, hid->lc_h);
    if (0 != status) {
        fprintf(stderr,
           "couldn't unsubscribe lcmtypes_environment_t_handler %p!\n", hid);
        return -1;
    }
    free (hid);
    return 0;
}



================================================
FILE: data_generation/lcmtypes/lcmtypes/c/lcmtypes/lcmtypes_environment_t.h
================================================
// THIS IS AN AUTOMATICALLY GENERATED FILE.  DO NOT MODIFY
// BY HAND!!
//
// Generated by lcm-gen

#include <stdint.h>
#include <stdlib.h>
#include <lcm/lcm_coretypes.h>
#include <lcm/lcm.h>

#ifndef _lcmtypes_environment_t_h
#define _lcmtypes_environment_t_h

#ifdef __cplusplus
extern "C" {
#endif

#include "lcmtypes/lcmtypes_region_3d_t.h"
#include "lcmtypes/lcmtypes_region_3d_t.h"
#include "lcmtypes/lcmtypes_region_3d_t.h"
typedef struct _lcmtypes_environment_t lcmtypes_environment_t;
struct _lcmtypes_environment_t
{
    lcmtypes_region_3d_t operating;
    lcmtypes_region_3d_t goal;
    int32_t    num_obstacles;
    lcmtypes_region_3d_t *obstacles;
};

/**
 * Create a deep copy of a lcmtypes_environment_t.
 * When no longer needed, destroy it with lcmtypes_environment_t_destroy()
 */
lcmtypes_environment_t* lcmtypes_environment_t_copy(const lcmtypes_environment_t* to_copy);

/**
 * Destroy an instance of lcmtypes_environment_t created by lcmtypes_environment_t_copy()
 */
void lcmtypes_environment_t_destroy(lcmtypes_environment_t* to_destroy);

/**
 * Identifies a single subscription.  This is an opaque data type.
 */
typedef struct _lcmtypes_environment_t_subscription_t lcmtypes_environment_t_subscription_t;

/**
 * Prototype for a callback function invoked when a message of type
 * lcmtypes_environment_t is received.
 */
typedef void(*lcmtypes_environment_t_handler_t)(const lcm_recv_buf_t *rbuf,
             const char *channel, const lcmtypes_environment_t *msg, void *userdata);

/**
 * Publish a message of type lcmtypes_environment_t using LCM.
 *
 * @param lcm The LCM instance to publish with.
 * @param channel The channel to publish on.
 * @param msg The message to publish.
 * @return 0 on success, <0 on error.  Success means LCM has transferred
 * responsibility of the message data to the OS.
 */
int lcmtypes_environment_t_publish(lcm_t *lcm, const char *channel, const lcmtypes_environment_t *msg);

/**
 * Subscribe to messages of type lcmtypes_environment_t using LCM.
 *
 * @param lcm The LCM instance to subscribe with.
 * @param channel The channel to subscribe to.
 * @param handler The callback function invoked by LCM when a message is received.
 *                This function is invoked by LCM during calls to lcm_handle() and
 *                lcm_handle_timeout().
 * @param userdata An opaque pointer passed to @p handler when it is invoked.
 * @return 0 on success, <0 if an error occured
 */
lcmtypes_environment_t_subscription_t* lcmtypes_environment_t_subscribe(lcm_t *lcm, const char *channel, lcmtypes_environment_t_handler_t handler, void *userdata);

/**
 * Removes and destroys a subscription created by lcmtypes_environment_t_subscribe()
 */
int lcmtypes_environment_t_unsubscribe(lcm_t *lcm, lcmtypes_environment_t_subscription_t* hid);

/**
 * Sets the queue capacity for a subscription.
 * Some LCM providers (e.g., the default multicast provider) are implemented
 * using a background receive thread that constantly revceives messages from
 * the network.  As these messages are received, they are buffered on
 * per-subscription queues until dispatched by lcm_handle().  This function
 * how many messages are queued before dropping messages.
 *
 * @param subs the subscription to modify.
 * @param num_messages The maximum number of messages to queue
 *  on the subscription.
 * @return 0 on success, <0 if an error occured
 */
int lcmtypes_environment_t_subscription_set_queue_capacity(lcmtypes_environment_t_subscription_t* subs,
                              int num_messages);

/**
 * Encode a message of type lcmtypes_environment_t into binary form.
 *
 * @param buf The output buffer.
 * @param offset Encoding starts at this byte offset into @p buf.
 * @param maxlen Maximum number of bytes to write.  This should generally
 *               be equal to lcmtypes_environment_t_encoded_size().
 * @param msg The message to encode.
 * @return The number of bytes encoded, or <0 if an error occured.
 */
int lcmtypes_environment_t_encode(void *buf, int offset, int maxlen, const lcmtypes_environment_t *p);

/**
 * Decode a message of type lcmtypes_environment_t from binary form.
 * When decoding messages containing strings or variable-length arrays, this
 * function may allocate memory.  When finished with the decoded message,
 * release allocated resources with lcmtypes_environment_t_decode_cleanup().
 *
 * @param buf The buffer containing the encoded message
 * @param offset The byte offset into @p buf where the encoded message starts.
 * @param maxlen The maximum number of bytes to read while decoding.
 * @param msg Output parameter where the decoded message is stored
 * @return The number of bytes decoded, or <0 if an error occured.
 */
int lcmtypes_environment_t_decode(const void *buf, int offset, int maxlen, lcmtypes_environment_t *msg);

/**
 * Release resources allocated by lcmtypes_environment_t_decode()
 * @return 0
 */
int lcmtypes_environment_t_decode_cleanup(lcmtypes_environment_t *p);

/**
 * Check how many bytes are required to encode a message of type lcmtypes_environment_t
 */
int lcmtypes_environment_t_encoded_size(const lcmtypes_environment_t *p);

// LCM support functions. Users should not call these
int64_t __lcmtypes_environment_t_get_hash(void);
uint64_t __lcmtypes_environment_t_hash_recursive(const __lcm_hash_ptr *p);
int     __lcmtypes_environment_t_encode_array(void *buf, int offset, int maxlen, const lcmtypes_environment_t *p, int elements);
int     __lcmtypes_environment_t_decode_array(const void *buf, int offset, int maxlen, lcmtypes_environment_t *p, int elements);
int     __lcmtypes_environment_t_decode_array_cleanup(lcmtypes_environment_t *p, int elements);
int     __lcmtypes_environment_t_encoded_array_size(const lcmtypes_environment_t *p, int elements);
int     __lcmtypes_environment_t_clone_array(const lcmtypes_environment_t *p, lcmtypes_environment_t *q, int elements);

#ifdef __cplusplus
}
#endif

#endif


================================================
FILE: data_generation/lcmtypes/lcmtypes/c/lcmtypes/lcmtypes_graph_t.c
================================================
// THIS IS AN AUTOMATICALLY GENERATED FILE.  DO NOT MODIFY
// BY HAND!!
//
// Generated by lcm-gen

#include <string.h>
#include "lcmtypes/lcmtypes_graph_t.h"

static int __lcmtypes_graph_t_hash_computed;
static uint64_t __lcmtypes_graph_t_hash;

uint64_t __lcmtypes_graph_t_hash_recursive(const __lcm_hash_ptr *p)
{
    const __lcm_hash_ptr *fp;
    for (fp = p; fp != NULL; fp = fp->parent)
        if (fp->v == __lcmtypes_graph_t_get_hash)
            return 0;

    __lcm_hash_ptr cp;
    cp.parent =  p;
    cp.v = (void*)__lcmtypes_graph_t_get_hash;
    (void) cp;

    uint64_t hash = (uint64_t)0x49189ad7b639b453LL
         + __int32_t_hash_recursive(&cp)
         + __lcmtypes_vertex_t_hash_recursive(&cp)
         + __int32_t_hash_recursive(&cp)
         + __lcmtypes_edge_t_hash_recursive(&cp)
        ;

    return (hash<<1) + ((hash>>63)&1);
}

int64_t __lcmtypes_graph_t_get_hash(void)
{
    if (!__lcmtypes_graph_t_hash_computed) {
        __lcmtypes_graph_t_hash = (int64_t)__lcmtypes_graph_t_hash_recursive(NULL);
        __lcmtypes_graph_t_hash_computed = 1;
    }

    return __lcmtypes_graph_t_hash;
}

int __lcmtypes_graph_t_encode_array(void *buf, int offset, int maxlen, const lcmtypes_graph_t *p, int elements)
{
    int pos = 0, element;
    int thislen;

    for (element = 0; element < elements; element++) {

        thislen = __int32_t_encode_array(buf, offset + pos, maxlen - pos, &(p[element].num_vertices), 1);
        if (thislen < 0) return thislen; else pos += thislen;

        thislen = __lcmtypes_vertex_t_encode_array(buf, offset + pos, maxlen - pos, p[element].vertices, p[element].num_vertices);
        if (thislen < 0) return thislen; else pos += thislen;

        thislen = __int32_t_encode_array(buf, offset + pos, maxlen - pos, &(p[element].num_edges), 1);
        if (thislen < 0) return thislen; else pos += thislen;

        thislen = __lcmtypes_edge_t_encode_array(buf, offset + pos, maxlen - pos, p[element].edges, p[element].num_edges);
        if (thislen < 0) return thislen; else pos += thislen;

    }
    return pos;
}

int lcmtypes_graph_t_encode(void *buf, int offset, int maxlen, const lcmtypes_graph_t *p)
{
    int pos = 0, thislen;
    int64_t hash = __lcmtypes_graph_t_get_hash();

    thislen = __int64_t_encode_array(buf, offset + pos, maxlen - pos, &hash, 1);
    if (thislen < 0) return thislen; else pos += thislen;

    thislen = __lcmtypes_graph_t_encode_array(buf, offset + pos, maxlen - pos, p, 1);
    if (thislen < 0) return thislen; else pos += thislen;

    return pos;
}

int __lcmtypes_graph_t_encoded_array_size(const lcmtypes_graph_t *p, int elements)
{
    int size = 0, element;
    for (element = 0; element < elements; element++) {

        size += __int32_t_encoded_array_size(&(p[element].num_vertices), 1);

        size += __lcmtypes_vertex_t_encoded_array_size(p[element].vertices, p[element].num_vertices);

        size += __int32_t_encoded_array_size(&(p[element].num_edges), 1);

        size += __lcmtypes_edge_t_encoded_array_size(p[element].edges, p[element].num_edges);

    }
    return size;
}

int lcmtypes_graph_t_encoded_size(const lcmtypes_graph_t *p)
{
    return 8 + __lcmtypes_graph_t_encoded_array_size(p, 1);
}

int __lcmtypes_graph_t_decode_array(const void *buf, int offset, int maxlen, lcmtypes_graph_t *p, int elements)
{
    int pos = 0, thislen, element;

    for (element = 0; element < elements; element++) {

        thislen = __int32_t_decode_array(buf, offset + pos, maxlen - pos, &(p[element].num_vertices), 1);
        if (thislen < 0) return thislen; else pos += thislen;

        p[element].vertices = (lcmtypes_vertex_t*) lcm_malloc(sizeof(lcmtypes_vertex_t) * p[element].num_vertices);
        thislen = __lcmtypes_vertex_t_decode_array(buf, offset + pos, maxlen - pos, p[element].vertices, p[element].num_vertices);
        if (thislen < 0) return thislen; else pos += thislen;

        thislen = __int32_t_decode_array(buf, offset + pos, maxlen - pos, &(p[element].num_edges), 1);
        if (thislen < 0) return thislen; else pos += thislen;

        p[element].edges = (lcmtypes_edge_t*) lcm_malloc(sizeof(lcmtypes_edge_t) * p[element].num_edges);
        thislen = __lcmtypes_edge_t_decode_array(buf, offset + pos, maxlen - pos, p[element].edges, p[element].num_edges);
        if (thislen < 0) return thislen; else pos += thislen;

    }
    return pos;
}

int __lcmtypes_graph_t_decode_array_cleanup(lcmtypes_graph_t *p, int elements)
{
    int element;
    for (element = 0; element < elements; element++) {

        __int32_t_decode_array_cleanup(&(p[element].num_vertices), 1);

        __lcmtypes_vertex_t_decode_array_cleanup(p[element].vertices, p[element].num_vertices);
        if (p[element].vertices) free(p[element].vertices);

        __int32_t_decode_array_cleanup(&(p[element].num_edges), 1);

        __lcmtypes_edge_t_decode_array_cleanup(p[element].edges, p[element].num_edges);
        if (p[element].edges) free(p[element].edges);

    }
    return 0;
}

int lcmtypes_graph_t_decode(const void *buf, int offset, int maxlen, lcmtypes_graph_t *p)
{
    int pos = 0, thislen;
    int64_t hash = __lcmtypes_graph_t_get_hash();

    int64_t this_hash;
    thislen = __int64_t_decode_array(buf, offset + pos, maxlen - pos, &this_hash, 1);
    if (thislen < 0) return thislen; else pos += thislen;
    if (this_hash != hash) return -1;

    thislen = __lcmtypes_graph_t_decode_array(buf, offset + pos, maxlen - pos, p, 1);
    if (thislen < 0) return thislen; else pos += thislen;

    return pos;
}

int lcmtypes_graph_t_decode_cleanup(lcmtypes_graph_t *p)
{
    return __lcmtypes_graph_t_decode_array_cleanup(p, 1);
}

int __lcmtypes_graph_t_clone_array(const lcmtypes_graph_t *p, lcmtypes_graph_t *q, int elements)
{
    int element;
    for (element = 0; element < elements; element++) {

        __int32_t_clone_array(&(p[element].num_vertices), &(q[element].num_vertices), 1);

        q[element].vertices = (lcmtypes_vertex_t*) lcm_malloc(sizeof(lcmtypes_vertex_t) * q[element].num_vertices);
        __lcmtypes_vertex_t_clone_array(p[element].vertices, q[element].vertices, p[element].num_vertices);

        __int32_t_clone_array(&(p[element].num_edges), &(q[element].num_edges), 1);

        q[element].edges = (lcmtypes_edge_t*) lcm_malloc(sizeof(lcmtypes_edge_t) * q[element].num_edges);
        __lcmtypes_edge_t_clone_array(p[element].edges, q[element].edges, p[element].num_edges);

    }
    return 0;
}

lcmtypes_graph_t *lcmtypes_graph_t_copy(const lcmtypes_graph_t *p)
{
    lcmtypes_graph_t *q = (lcmtypes_graph_t*) malloc(sizeof(lcmtypes_graph_t));
    __lcmtypes_graph_t_clone_array(p, q, 1);
    return q;
}

void lcmtypes_graph_t_destroy(lcmtypes_graph_t *p)
{
    __lcmtypes_graph_t_decode_array_cleanup(p, 1);
    free(p);
}

int lcmtypes_graph_t_publish(lcm_t *lc, const char *channel, const lcmtypes_graph_t *p)
{
      int max_data_size = lcmtypes_graph_t_encoded_size (p);
      uint8_t *buf = (uint8_t*) malloc (max_data_size);
      if (!buf) return -1;
      int data_size = lcmtypes_graph_t_encode (buf, 0, max_data_size, p);
      if (data_size < 0) {
          free (buf);
          return data_size;
      }
      int status = lcm_publish (lc, channel, buf, data_size);
      free (buf);
      return status;
}

struct _lcmtypes_graph_t_subscription_t {
    lcmtypes_graph_t_handler_t user_handler;
    void *userdata;
    lcm_subscription_t *lc_h;
};
static
void lcmtypes_graph_t_handler_stub (const lcm_recv_buf_t *rbuf,
                            const char *channel, void *userdata)
{
    int status;
    lcmtypes_graph_t p;
    memset(&p, 0, sizeof(lcmtypes_graph_t));
    status = lcmtypes_graph_t_decode (rbuf->data, 0, rbuf->data_size, &p);
    if (status < 0) {
        fprintf (stderr, "error %d decoding lcmtypes_graph_t!!!\n", status);
        return;
    }

    lcmtypes_graph_t_subscription_t *h = (lcmtypes_graph_t_subscription_t*) userdata;
    h->user_handler (rbuf, channel, &p, h->userdata);

    lcmtypes_graph_t_decode_cleanup (&p);
}

lcmtypes_graph_t_subscription_t* lcmtypes_graph_t_subscribe (lcm_t *lcm,
                    const char *channel,
                    lcmtypes_graph_t_handler_t f, void *userdata)
{
    lcmtypes_graph_t_subscription_t *n = (lcmtypes_graph_t_subscription_t*)
                       malloc(sizeof(lcmtypes_graph_t_subscription_t));
    n->user_handler = f;
    n->userdata = userdata;
    n->lc_h = lcm_subscribe (lcm, channel,
                                 lcmtypes_graph_t_handler_stub, n);
    if (n->lc_h == NULL) {
        fprintf (stderr,"couldn't reg lcmtypes_graph_t LCM handler!\n");
        free (n);
        return NULL;
    }
    return n;
}

int lcmtypes_graph_t_subscription_set_queue_capacity (lcmtypes_graph_t_subscription_t* subs,
                              int num_messages)
{
    return lcm_subscription_set_queue_capacity (subs->lc_h, num_messages);
}

int lcmtypes_graph_t_unsubscribe(lcm_t *lcm, lcmtypes_graph_t_subscription_t* hid)
{
    int status = lcm_unsubscribe (lcm, hid->lc_h);
    if (0 != status) {
        fprintf(stderr,
           "couldn't unsubscribe lcmtypes_graph_t_handler %p!\n", hid);
        return -1;
    }
    free (hid);
    return 0;
}



================================================
FILE: data_generation/lcmtypes/lcmtypes/c/lcmtypes/lcmtypes_graph_t.h
================================================
// THIS IS AN AUTOMATICALLY GENERATED FILE.  DO NOT MODIFY
// BY HAND!!
//
// Generated by lcm-gen

#include <stdint.h>
#include <stdlib.h>
#include <lcm/lcm_coretypes.h>
#include <lcm/lcm.h>

#ifndef _lcmtypes_graph_t_h
#define _lcmtypes_graph_t_h

#ifdef __cplusplus
extern "C" {
#endif

#include "lcmtypes/lcmtypes_vertex_t.h"
#include "lcmtypes/lcmtypes_edge_t.h"
typedef struct _lcmtypes_graph_t lcmtypes_graph_t;
struct _lcmtypes_graph_t
{
    int32_t    num_vertices;
    lcmtypes_vertex_t *vertices;
    int32_t    num_edges;
    lcmtypes_edge_t *edges;
};

/**
 * Create a deep copy of a lcmtypes_graph_t.
 * When no longer needed, destroy it with lcmtypes_graph_t_destroy()
 */
lcmtypes_graph_t* lcmtypes_graph_t_copy(const lcmtypes_graph_t* to_copy);

/**
 * Destroy an instance of lcmtypes_graph_t created by lcmtypes_graph_t_copy()
 */
void lcmtypes_graph_t_destroy(lcmtypes_graph_t* to_destroy);

/**
 * Identifies a single subscription.  This is an opaque data type.
 */
typedef struct _lcmtypes_graph_t_subscription_t lcmtypes_graph_t_subscription_t;

/**
 * Prototype for a callback function invoked when a message of type
 * lcmtypes_graph_t is received.
 */
typedef void(*lcmtypes_graph_t_handler_t)(const lcm_recv_buf_t *rbuf,
             const char *channel, const lcmtypes_graph_t *msg, void *userdata);

/**
 * Publish a message of type lcmtypes_graph_t using LCM.
 *
 * @param lcm The LCM instance to publish with.
 * @param channel The channel to publish on.
 * @param msg The message to publish.
 * @return 0 on success, <0 on error.  Success means LCM has transferred
 * responsibility of the message data to the OS.
 */
int lcmtypes_graph_t_publish(lcm_t *lcm, const char *channel, const lcmtypes_graph_t *msg);

/**
 * Subscribe to messages of type lcmtypes_graph_t using LCM.
 *
 * @param lcm The LCM instance to subscribe with.
 * @param channel The channel to subscribe to.
 * @param handler The callback function invoked by LCM when a message is received.
 *                This function is invoked by LCM during calls to lcm_handle() and
 *                lcm_handle_timeout().
 * @param userdata An opaque pointer passed to @p handler when it is invoked.
 * @return 0 on success, <0 if an error occured
 */
lcmtypes_graph_t_subscription_t* lcmtypes_graph_t_subscribe(lcm_t *lcm, const char *channel, lcmtypes_graph_t_handler_t handler, void *userdata);

/**
 * Removes and destroys a subscription created by lcmtypes_graph_t_subscribe()
 */
int lcmtypes_graph_t_unsubscribe(lcm_t *lcm, lcmtypes_graph_t_subscription_t* hid);

/**
 * Sets the queue capacity for a subscription.
 * Some LCM providers (e.g., the default multicast provider) are implemented
 * using a background receive thread that constantly revceives messages from
 * the network.  As these messages are received, they are buffered on
 * per-subscription queues until dispatched by lcm_handle().  This function
 * how many messages are queued before dropping messages.
 *
 * @param subs the subscription to modify.
 * @param num_messages The maximum number of messages to queue
 *  on the subscription.
 * @return 0 on success, <0 if an error occured
 */
int lcmtypes_graph_t_subscription_set_queue_capacity(lcmtypes_graph_t_subscription_t* subs,
                              int num_messages);

/**
 * Encode a message of type lcmtypes_graph_t into binary form.
 *
 * @param buf The output buffer.
 * @param offset Encoding starts at this byte offset into @p buf.
 * @param maxlen Maximum number of bytes to write.  This should generally
 *               be equal to lcmtypes_graph_t_encoded_size().
 * @param msg The message to encode.
 * @return The number of bytes encoded, or <0 if an error occured.
 */
int lcmtypes_graph_t_encode(void *buf, int offset, int maxlen, const lcmtypes_graph_t *p);

/**
 * Decode a message of type lcmtypes_graph_t from binary form.
 * When decoding messages containing strings or variable-length arrays, this
 * function may allocate memory.  When finished with the decoded message,
 * release allocated resources with lcmtypes_graph_t_decode_cleanup().
 *
 * @param buf The buffer containing the encoded message
 * @param offset The byte offset into @p buf where the encoded message starts.
 * @param maxlen The maximum number of bytes to read while decoding.
 * @param msg Output parameter where the decoded message is stored
 * @return The number of bytes decoded, or <0 if an error occured.
 */
int lcmtypes_graph_t_decode(const void *buf, int offset, int maxlen, lcmtypes_graph_t *msg);

/**
 * Release resources allocated by lcmtypes_graph_t_decode()
 * @return 0
 */
int lcmtypes_graph_t_decode_cleanup(lcmtypes_graph_t *p);

/**
 * Check how many bytes are required to encode a message of type lcmtypes_graph_t
 */
int lcmtypes_graph_t_encoded_size(const lcmtypes_graph_t *p);

// LCM support functions. Users should not call these
int64_t __lcmtypes_graph_t_get_hash(void);
uint64_t __lcmtypes_graph_t_hash_recursive(const __lcm_hash_ptr *p);
int     __lcmtypes_graph_t_encode_array(void *buf, int offset, int maxlen, const lcmtypes_graph_t *p, int elements);
int     __lcmtypes_graph_t_decode_array(const void *buf, int offset, int maxlen, lcmtypes_graph_t *p, int elements);
int     __lcmtypes_graph_t_decode_array_cleanup(lcmtypes_graph_t *p, int elements);
int     __lcmtypes_graph_t_encoded_array_size(const lcmtypes_graph_t *p, int elements);
int     __lcmtypes_graph_t_clone_array(const lcmtypes_graph_t *p, lcmtypes_graph_t *q, int elements);

#ifdef __cplusplus
}
#endif

#endif


================================================
FILE: data_generation/lcmtypes/lcmtypes/c/lcmtypes/lcmtypes_region_3d_t.c
================================================
// THIS IS AN AUTOMATICALLY GENERATED FILE.  DO NOT MODIFY
// BY HAND!!
//
// Generated by lcm-gen

#include <string.h>
#include "lcmtypes/lcmtypes_region_3d_t.h"

static int __lcmtypes_region_3d_t_hash_computed;
static uint64_t __lcmtypes_region_3d_t_hash;

uint64_t __lcmtypes_region_3d_t_hash_recursive(const __lcm_hash_ptr *p)
{
    const __lcm_hash_ptr *fp;
    for (fp = p; fp != NULL; fp = fp->parent)
        if (fp->v == __lcmtypes_region_3d_t_get_hash)
            return 0;

    __lcm_hash_ptr cp;
    cp.parent =  p;
    cp.v = (void*)__lcmtypes_region_3d_t_get_hash;
    (void) cp;

    uint64_t hash = (uint64_t)0x94830fc8d7404191LL
         + __double_hash_recursive(&cp)
         + __double_hash_recursive(&cp)
        ;

    return (hash<<1) + ((hash>>63)&1);
}

int64_t __lcmtypes_region_3d_t_get_hash(void)
{
    if (!__lcmtypes_region_3d_t_hash_computed) {
        __lcmtypes_region_3d_t_hash = (int64_t)__lcmtypes_region_3d_t_hash_recursive(NULL);
        __lcmtypes_region_3d_t_hash_computed = 1;
    }

    return __lcmtypes_region_3d_t_hash;
}

int __lcmtypes_region_3d_t_encode_array(void *buf, int offset, int maxlen, const lcmtypes_region_3d_t *p, int elements)
{
    int pos = 0, element;
    int thislen;

    for (element = 0; element < elements; element++) {

        thislen = __double_encode_array(buf, offset + pos, maxlen - pos, p[element].center, 3);
        if (thislen < 0) return thislen; else pos += thislen;

        thislen = __double_encode_array(buf, offset + pos, maxlen - pos, p[element].size, 3);
        if (thislen < 0) return thislen; else pos += thislen;

    }
    return pos;
}

int lcmtypes_region_3d_t_encode(void *buf, int offset, int maxlen, const lcmtypes_region_3d_t *p)
{
    int pos = 0, thislen;
    int64_t hash = __lcmtypes_region_3d_t_get_hash();

    thislen = __int64_t_encode_array(buf, offset + pos, maxlen - pos, &hash, 1);
    if (thislen < 0) return thislen; else pos += thislen;

    thislen = __lcmtypes_region_3d_t_encode_array(buf, offset + pos, maxlen - pos, p, 1);
    if (thislen < 0) return thislen; else pos += thislen;

    return pos;
}

int __lcmtypes_region_3d_t_encoded_array_size(const lcmtypes_region_3d_t *p, int elements)
{
    int size = 0, element;
    for (element = 0; element < elements; element++) {

        size += __double_encoded_array_size(p[element].center, 3);

        size += __double_encoded_array_size(p[element].size, 3);

    }
    return size;
}

int lcmtypes_region_3d_t_encoded_size(const lcmtypes_region_3d_t *p)
{
    return 8 + __lcmtypes_region_3d_t_encoded_array_size(p, 1);
}

int __lcmtypes_region_3d_t_decode_array(const void *buf, int offset, int maxlen, lcmtypes_region_3d_t *p, int elements)
{
    int pos = 0, thislen, element;

    for (element = 0; element < elements; element++) {

        thislen = __double_decode_array(buf, offset + pos, maxlen - pos, p[element].center, 3);
        if (thislen < 0) return thislen; else pos += thislen;

        thislen = __double_decode_array(buf, offset + pos, maxlen - pos, p[element].size, 3);
        if (thislen < 0) return thislen; else pos += thislen;

    }
    return pos;
}

int __lcmtypes_region_3d_t_decode_array_cleanup(lcmtypes_region_3d_t *p, int elements)
{
    int element;
    for (element = 0; element < elements; element++) {

        __double_decode_array_cleanup(p[element].center, 3);

        __double_decode_array_cleanup(p[element].size, 3);

    }
    return 0;
}

int lcmtypes_region_3d_t_decode(const void *buf, int offset, int maxlen, lcmtypes_region_3d_t *p)
{
    int pos = 0, thislen;
    int64_t hash = __lcmtypes_region_3d_t_get_hash();

    int64_t this_hash;
    thislen = __int64_t_decode_array(buf, offset + pos, maxlen - pos, &this_hash, 1);
    if (thislen < 0) return thislen; else pos += thislen;
    if (this_hash != hash) return -1;

    thislen = __lcmtypes_region_3d_t_decode_array(buf, offset + pos, maxlen - pos, p, 1);
    if (thislen < 0) return thislen; else pos += thislen;

    return pos;
}

int lcmtypes_region_3d_t_decode_cleanup(lcmtypes_region_3d_t *p)
{
    return __lcmtypes_region_3d_t_decode_array_cleanup(p, 1);
}

int __lcmtypes_region_3d_t_clone_array(const lcmtypes_region_3d_t *p, lcmtypes_region_3d_t *q, int elements)
{
    int element;
    for (element = 0; element < elements; element++) {

        __double_clone_array(p[element].center, q[element].center, 3);

        __double_clone_array(p[element].size, q[element].size, 3);

    }
    return 0;
}

lcmtypes_region_3d_t *lcmtypes_region_3d_t_copy(const lcmtypes_region_3d_t *p)
{
    lcmtypes_region_3d_t *q = (lcmtypes_region_3d_t*) malloc(sizeof(lcmtypes_region_3d_t));
    __lcmtypes_region_3d_t_clone_array(p, q, 1);
    return q;
}

void lcmtypes_region_3d_t_destroy(lcmtypes_region_3d_t *p)
{
    __lcmtypes_region_3d_t_decode_array_cleanup(p, 1);
    free(p);
}

int lcmtypes_region_3d_t_publish(lcm_t *lc, const char *channel, const lcmtypes_region_3d_t *p)
{
      int max_data_size = lcmtypes_region_3d_t_encoded_size (p);
      uint8_t *buf = (uint8_t*) malloc (max_data_size);
      if (!buf) return -1;
      int data_size = lcmtypes_region_3d_t_encode (buf, 0, max_data_size, p);
      if (data_size < 0) {
          free (buf);
          return data_size;
      }
      int status = lcm_publish (lc, channel, buf, data_size);
      free (buf);
      return status;
}

struct _lcmtypes_region_3d_t_subscription_t {
    lcmtypes_region_3d_t_handler_t user_handler;
    void *userdata;
    lcm_subscription_t *lc_h;
};
static
void lcmtypes_region_3d_t_handler_stub (const lcm_recv_buf_t *rbuf,
                            const char *channel, void *userdata)
{
    int status;
    lcmtypes_region_3d_t p;
    memset(&p, 0, sizeof(lcmtypes_region_3d_t));
    status = lcmtypes_region_3d_t_decode (rbuf->data, 0, rbuf->data_size, &p);
    if (status < 0) {
        fprintf (stderr, "error %d decoding lcmtypes_region_3d_t!!!\n", status);
        return;
    }

    lcmtypes_region_3d_t_subscription_t *h = (lcmtypes_region_3d_t_subscription_t*) userdata;
    h->user_handler (rbuf, channel, &p, h->userdata);

    lcmtypes_region_3d_t_decode_cleanup (&p);
}

lcmtypes_region_3d_t_subscription_t* lcmtypes_region_3d_t_subscribe (lcm_t *lcm,
                    const char *channel,
                    lcmtypes_region_3d_t_handler_t f, void *userdata)
{
    lcmtypes_region_3d_t_subscription_t *n = (lcmtypes_region_3d_t_subscription_t*)
                       malloc(sizeof(lcmtypes_region_3d_t_subscription_t));
    n->user_handler = f;
    n->userdata = userdata;
    n->lc_h = lcm_subscribe (lcm, channel,
                                 lcmtypes_region_3d_t_handler_stub, n);
    if (n->lc_h == NULL) {
        fprintf (stderr,"couldn't reg lcmtypes_region_3d_t LCM handler!\n");
        free (n);
        return NULL;
    }
    return n;
}

int lcmtypes_region_3d_t_subscription_set_queue_capacity (lcmtypes_region_3d_t_subscription_t* subs,
                              int num_messages)
{
    return lcm_subscription_set_queue_capacity (subs->lc_h, num_messages);
}

int lcmtypes_region_3d_t_unsubscribe(lcm_t *lcm, lcmtypes_region_3d_t_subscription_t* hid)
{
    int status = lcm_unsubscribe (lcm, hid->lc_h);
    if (0 != status) {
        fprintf(stderr,
           "couldn't unsubscribe lcmtypes_region_3d_t_handler %p!\n", hid);
        return -1;
    }
    free (hid);
    return 0;
}



================================================
FILE: data_generation/lcmtypes/lcmtypes/c/lcmtypes/lcmtypes_region_3d_t.h
================================================
// THIS IS AN AUTOMATICALLY GENERATED FILE.  DO NOT MODIFY
// BY HAND!!
//
// Generated by lcm-gen

#include <stdint.h>
#include <stdlib.h>
#include <lcm/lcm_coretypes.h>
#include <lcm/lcm.h>

#ifndef _lcmtypes_region_3d_t_h
#define _lcmtypes_region_3d_t_h

#ifdef __cplusplus
extern "C" {
#endif

typedef struct _lcmtypes_region_3d_t lcmtypes_region_3d_t;
struct _lcmtypes_region_3d_t
{
    double     center[3];
    double     size[3];
};

/**
 * Create a deep copy of a lcmtypes_region_3d_t.
 * When no longer needed, destroy it with lcmtypes_region_3d_t_destroy()
 */
lcmtypes_region_3d_t* lcmtypes_region_3d_t_copy(const lcmtypes_region_3d_t* to_copy);

/**
 * Destroy an instance of lcmtypes_region_3d_t created by lcmtypes_region_3d_t_copy()
 */
void lcmtypes_region_3d_t_destroy(lcmtypes_region_3d_t* to_destroy);

/**
 * Identifies a single subscription.  This is an opaque data type.
 */
typedef struct _lcmtypes_region_3d_t_subscription_t lcmtypes_region_3d_t_subscription_t;

/**
 * Prototype for a callback function invoked when a message of type
 * lcmtypes_region_3d_t is received.
 */
typedef void(*lcmtypes_region_3d_t_handler_t)(const lcm_recv_buf_t *rbuf,
             const char *channel, const lcmtypes_region_3d_t *msg, void *userdata);

/**
 * Publish a message of type lcmtypes_region_3d_t using LCM.
 *
 * @param lcm The LCM instance to publish with.
 * @param channel The channel to publish on.
 * @param msg The message to publish.
 * @return 0 on success, <0 on error.  Success means LCM has transferred
 * responsibility of the message data to the OS.
 */
int lcmtypes_region_3d_t_publish(lcm_t *lcm, const char *channel, const lcmtypes_region_3d_t *msg);

/**
 * Subscribe to messages of type lcmtypes_region_3d_t using LCM.
 *
 * @param lcm The LCM instance to subscribe with.
 * @param channel The channel to subscribe to.
 * @param handler The callback function invoked by LCM when a message is received.
 *                This function is invoked by LCM during calls to lcm_handle() and
 *                lcm_handle_timeout().
 * @param userdata An opaque pointer passed to @p handler when it is invoked.
 * @return 0 on success, <0 if an error occured
 */
lcmtypes_region_3d_t_subscription_t* lcmtypes_region_3d_t_subscribe(lcm_t *lcm, const char *channel, lcmtypes_region_3d_t_handler_t handler, void *userdata);

/**
 * Removes and destroys a subscription created by lcmtypes_region_3d_t_subscribe()
 */
int lcmtypes_region_3d_t_unsubscribe(lcm_t *lcm, lcmtypes_region_3d_t_subscription_t* hid);

/**
 * Sets the queue capacity for a subscription.
 * Some LCM providers (e.g., the default multicast provider) are implemented
 * using a background receive thread that constantly revceives messages from
 * the network.  As these messages are received, they are buffered on
 * per-subscription queues until dispatched by lcm_handle().  This function
 * how many messages are queued before dropping messages.
 *
 * @param subs the subscription to modify.
 * @param num_messages The maximum number of messages to queue
 *  on the subscription.
 * @return 0 on success, <0 if an error occured
 */
int lcmtypes_region_3d_t_subscription_set_queue_capacity(lcmtypes_region_3d_t_subscription_t* subs,
                              int num_messages);

/**
 * Encode a message of type lcmtypes_region_3d_t into binary form.
 *
 * @param buf The output buffer.
 * @param offset Encoding starts at this byte offset into @p buf.
 * @param maxlen Maximum number of bytes to write.  This should generally
 *               be equal to lcmtypes_region_3d_t_encoded_size().
 * @param msg The message to encode.
 * @return The number of bytes encoded, or <0 if an error occured.
 */
int lcmtypes_region_3d_t_encode(void *buf, int offset, int maxlen, const lcmtypes_region_3d_t *p);

/**
 * Decode a message of type lcmtypes_region_3d_t from binary form.
 * When decoding messages containing strings or variable-length arrays, this
 * function may allocate memory.  When finished with the decoded message,
 * release allocated resources with lcmtypes_region_3d_t_decode_cleanup().
 *
 * @param buf The buffer containing the encoded message
 * @param offset The byte offset into @p buf where the encoded message starts.
 * @param maxlen The maximum number of bytes to read while decoding.
 * @param msg Output parameter where the decoded message is stored
 * @return The number of bytes decoded, or <0 if an error occured.
 */
int lcmtypes_region_3d_t_decode(const void *buf, int offset, int maxlen, lcmtypes_region_3d_t *msg);

/**
 * Release resources allocated by lcmtypes_region_3d_t_decode()
 * @return 0
 */
int lcmtypes_region_3d_t_decode_cleanup(lcmtypes_region_3d_t *p);

/**
 * Check how many bytes are required to encode a message of type lcmtypes_region_3d_t
 */
int lcmtypes_region_3d_t_encoded_size(const lcmtypes_region_3d_t *p);

// LCM support functions. Users should not call these
int64_t __lcmtypes_region_3d_t_get_hash(void);
uint64_t __lcmtypes_region_3d_t_hash_recursive(const __lcm_hash_ptr *p);
int     __lcmtypes_region_3d_t_encode_array(void *buf, int offset, int maxlen, const lcmtypes_region_3d_t *p, int elements);
int     __lcmtypes_region_3d_t_decode_array(const void *buf, int offset, int maxlen, lcmtypes_region_3d_t *p, int elements);
int     __lcmtypes_region_3d_t_decode_array_cleanup(lcmtypes_region_3d_t *p, int elements);
int     __lcmtypes_region_3d_t_encoded_array_size(const lcmtypes_region_3d_t *p, int elements);
int     __lcmtypes_region_3d_t_clone_array(const lcmtypes_region_3d_t *p, lcmtypes_region_3d_t *q, int elements);

#ifdef __cplusplus
}
#endif

#endif


================================================
FILE: data_generation/lcmtypes/lcmtypes/c/lcmtypes/lcmtypes_state_t.c
================================================
// THIS IS AN AUTOMATICALLY GENERATED FILE.  DO NOT MODIFY
// BY HAND!!
//
// Generated by lcm-gen

#include <string.h>
#include "lcmtypes/lcmtypes_state_t.h"

static int __lcmtypes_state_t_hash_computed;
static uint64_t __lcmtypes_state_t_hash;

uint64_t __lcmtypes_state_t_hash_recursive(const __lcm_hash_ptr *p)
{
    const __lcm_hash_ptr *fp;
    for (fp = p; fp != NULL; fp = fp->parent)
        if (fp->v == __lcmtypes_state_t_get_hash)
            return 0;

    __lcm_hash_ptr cp;
    cp.parent =  p;
    cp.v = (void*)__lcmtypes_state_t_get_hash;
    (void) cp;

    uint64_t hash = (uint64_t)0x573f2fdd2f76508fLL
         + __double_hash_recursive(&cp)
         + __double_hash_recursive(&cp)
         + __double_hash_recursive(&cp)
        ;

    return (hash<<1) + ((hash>>63)&1);
}

int64_t __lcmtypes_state_t_get_hash(void)
{
    if (!__lcmtypes_state_t_hash_computed) {
        __lcmtypes_state_t_hash = (int64_t)__lcmtypes_state_t_hash_recursive(NULL);
        __lcmtypes_state_t_hash_computed = 1;
    }

    return __lcmtypes_state_t_hash;
}

int __lcmtypes_state_t_encode_array(void *buf, int offset, int maxlen, const lcmtypes_state_t *p, int elements)
{
    int pos = 0, element;
    int thislen;

    for (element = 0; element < elements; element++) {

        thislen = __double_encode_array(buf, offset + pos, maxlen - pos, &(p[element].x), 1);
        if (thislen < 0) return thislen; else pos += thislen;

        thislen = __double_encode_array(buf, offset + pos, maxlen - pos, &(p[element].y), 1);
        if (thislen < 0) return thislen; else pos += thislen;

        thislen = __double_encode_array(buf, offset + pos, maxlen - pos, &(p[element].z), 1);
        if (thislen < 0) return thislen; else pos += thislen;

    }
    return pos;
}

int lcmtypes_state_t_encode(void *buf, int offset, int maxlen, const lcmtypes_state_t *p)
{
    int pos = 0, thislen;
    int64_t hash = __lcmtypes_state_t_get_hash();

    thislen = __int64_t_encode_array(buf, offset + pos, maxlen - pos, &hash, 1);
    if (thislen < 0) return thislen; else pos += thislen;

    thislen = __lcmtypes_state_t_encode_array(buf, offset + pos, maxlen - pos, p, 1);
    if (thislen < 0) return thislen; else pos += thislen;

    return pos;
}

int __lcmtypes_state_t_encoded_array_size(const lcmtypes_state_t *p, int elements)
{
    int size = 0, element;
    for (element = 0; element < elements; element++) {

        size += __double_encoded_array_size(&(p[element].x), 1);

        size += __double_encoded_array_size(&(p[element].y), 1);

        size += __double_encoded_array_size(&(p[element].z), 1);

    }
    return size;
}

int lcmtypes_state_t_encoded_size(const lcmtypes_state_t *p)
{
    return 8 + __lcmtypes_state_t_encoded_array_size(p, 1);
}

int __lcmtypes_state_t_decode_array(const void *buf, int offset, int maxlen, lcmtypes_state_t *p, int elements)
{
    int pos = 0, thislen, element;

    for (element = 0; element < elements; element++) {

        thislen = __double_decode_array(buf, offset + pos, maxlen - pos, &(p[element].x), 1);
        if (thislen < 0) return thislen; else pos += thislen;

        thislen = __double_decode_array(buf, offset + pos, maxlen - pos, &(p[element].y), 1);
        if (thislen < 0) return thislen; else pos += thislen;

        thislen = __double_decode_array(buf, offset + pos, maxlen - pos, &(p[element].z), 1);
        if (thislen < 0) return thislen; else pos += thislen;

    }
    return pos;
}

int __lcmtypes_state_t_decode_array_cleanup(lcmtypes_state_t *p, int elements)
{
    int element;
    for (element = 0; element < elements; element++) {

        __double_decode_array_cleanup(&(p[element].x), 1);

        __double_decode_array_cleanup(&(p[element].y), 1);

        __double_decode_array_cleanup(&(p[element].z), 1);

    }
    return 0;
}

int lcmtypes_state_t_decode(const void *buf, int offset, int maxlen, lcmtypes_state_t *p)
{
    int pos = 0, thislen;
    int64_t hash = __lcmtypes_state_t_get_hash();

    int64_t this_hash;
    thislen = __int64_t_decode_array(buf, offset + pos, maxlen - pos, &this_hash, 1);
    if (thislen < 0) return thislen; else pos += thislen;
    if (this_hash != hash) return -1;

    thislen = __lcmtypes_state_t_decode_array(buf, offset + pos, maxlen - pos, p, 1);
    if (thislen < 0) return thislen; else pos += thislen;

    return pos;
}

int lcmtypes_state_t_decode_cleanup(lcmtypes_state_t *p)
{
    return __lcmtypes_state_t_decode_array_cleanup(p, 1);
}

int __lcmtypes_state_t_clone_array(const lcmtypes_state_t *p, lcmtypes_state_t *q, int elements)
{
    int element;
    for (element = 0; element < elements; element++) {

        __double_clone_array(&(p[element].x), &(q[element].x), 1);

        __double_clone_array(&(p[element].y), &(q[element].y), 1);

        __double_clone_array(&(p[element].z), &(q[element].z), 1);

    }
    return 0;
}

lcmtypes_state_t *lcmtypes_state_t_copy(const lcmtypes_state_t *p)
{
    lcmtypes_state_t *q = (lcmtypes_state_t*) malloc(sizeof(lcmtypes_state_t));
    __lcmtypes_state_t_clone_array(p, q, 1);
    return q;
}

void lcmtypes_state_t_destroy(lcmtypes_state_t *p)
{
    __lcmtypes_state_t_decode_array_cleanup(p, 1);
    free(p);
}

int lcmtypes_state_t_publish(lcm_t *lc, const char *channel, const lcmtypes_state_t *p)
{
      int max_data_size = lcmtypes_state_t_encoded_size (p);
      uint8_t *buf = (uint8_t*) malloc (max_data_size);
      if (!buf) return -1;
      int data_size = lcmtypes_state_t_encode (buf, 0, max_data_size, p);
      if (data_size < 0) {
          free (buf);
          return data_size;
      }
      int status = lcm_publish (lc, channel, buf, data_size);
      free (buf);
      return status;
}

struct _lcmtypes_state_t_subscription_t {
    lcmtypes_state_t_handler_t user_handler;
    void *userdata;
    lcm_subscription_t *lc_h;
};
static
void lcmtypes_state_t_handler_stub (const lcm_recv_buf_t *rbuf,
                            const char *channel, void *userdata)
{
    int status;
    lcmtypes_state_t p;
    memset(&p, 0, sizeof(lcmtypes_state_t));
    status = lcmtypes_state_t_decode (rbuf->data, 0, rbuf->data_size, &p);
    if (status < 0) {
        fprintf (stderr, "error %d decoding lcmtypes_state_t!!!\n", status);
        return;
    }

    lcmtypes_state_t_subscription_t *h = (lcmtypes_state_t_subscription_t*) userdata;
    h->user_handler (rbuf, channel, &p, h->userdata);

    lcmtypes_state_t_decode_cleanup (&p);
}

lcmtypes_state_t_subscription_t* lcmtypes_state_t_subscribe (lcm_t *lcm,
                    const char *channel,
                    lcmtypes_state_t_handler_t f, void *userdata)
{
    lcmtypes_state_t_subscription_t *n = (lcmtypes_state_t_subscription_t*)
                       malloc(sizeof(lcmtypes_state_t_subscription_t));
    n->user_handler = f;
    n->userdata = userdata;
    n->lc_h = lcm_subscribe (lcm, channel,
                                 lcmtypes_state_t_handler_stub, n);
    if (n->lc_h == NULL) {
        fprintf (stderr,"couldn't reg lcmtypes_state_t LCM handler!\n");
        free (n);
        return NULL;
    }
    return n;
}

int lcmtypes_state_t_subscription_set_queue_capacity (lcmtypes_state_t_subscription_t* subs,
                              int num_messages)
{
    return lcm_subscription_set_queue_capacity (subs->lc_h, num_messages);
}

int lcmtypes_state_t_unsubscribe(lcm_t *lcm, lcmtypes_state_t_subscription_t* hid)
{
    int status = lcm_unsubscribe (lcm, hid->lc_h);
    if (0 != status) {
        fprintf(stderr,
           "couldn't unsubscribe lcmtypes_state_t_handler %p!\n", hid);
        return -1;
    }
    free (hid);
    return 0;
}



================================================
FILE: data_generation/lcmtypes/lcmtypes/c/lcmtypes/lcmtypes_state_t.h
================================================
// THIS IS AN AUTOMATICALLY GENERATED FILE.  DO NOT MODIFY
// BY HAND!!
//
// Generated by lcm-gen

#include <stdint.h>
#include <stdlib.h>
#include <lcm/lcm_coretypes.h>
#include <lcm/lcm.h>

#ifndef _lcmtypes_state_t_h
#define _lcmtypes_state_t_h

#ifdef __cplusplus
extern "C" {
#endif

typedef struct _lcmtypes_state_t lcmtypes_state_t;
struct _lcmtypes_state_t
{
    double     x;
    double     y;
    double     z;
};

/**
 * Create a deep copy of a lcmtypes_state_t.
 * When no longer needed, destroy it with lcmtypes_state_t_destroy()
 */
lcmtypes_state_t* lcmtypes_state_t_copy(const lcmtypes_state_t* to_copy);

/**
 * Destroy an instance of lcmtypes_state_t created by lcmtypes_state_t_copy()
 */
void lcmtypes_state_t_destroy(lcmtypes_state_t* to_destroy);

/**
 * Identifies a single subscription.  This is an opaque data type.
 */
typedef struct _lcmtypes_state_t_subscription_t lcmtypes_state_t_subscription_t;

/**
 * Prototype for a callback function invoked when a message of type
 * lcmtypes_state_t is received.
 */
typedef void(*lcmtypes_state_t_handler_t)(const lcm_recv_buf_t *rbuf,
             const char *channel, const lcmtypes_state_t *msg, void *userdata);

/**
 * Publish a message of type lcmtypes_state_t using LCM.
 *
 * @param lcm The LCM instance to publish with.
 * @param channel The channel to publish on.
 * @param msg The message to publish.
 * @return 0 on success, <0 on error.  Success means LCM has transferred
 * responsibility of the message data to the OS.
 */
int lcmtypes_state_t_publish(lcm_t *lcm, const char *channel, const lcmtypes_state_t *msg);

/**
 * Subscribe to messages of type lcmtypes_state_t using LCM.
 *
 * @param lcm The LCM instance to subscribe with.
 * @param channel The channel to subscribe to.
 * @param handler The callback function invoked by LCM when a message is received.
 *                This function is invoked by LCM during calls to lcm_handle() and
 *                lcm_handle_timeout().
 * @param userdata An opaque pointer passed to @p handler when it is invoked.
 * @return 0 on success, <0 if an error occured
 */
lcmtypes_state_t_subscription_t* lcmtypes_state_t_subscribe(lcm_t *lcm, const char *channel, lcmtypes_state_t_handler_t handler, void *userdata);

/**
 * Removes and destroys a subscription created by lcmtypes_state_t_subscribe()
 */
int lcmtypes_state_t_unsubscribe(lcm_t *lcm, lcmtypes_state_t_subscription_t* hid);

/**
 * Sets the queue capacity for a subscription.
 * Some LCM providers (e.g., the default multicast provider) are implemented
 * using a background receive thread that constantly revceives messages from
 * the network.  As these messages are received, they are buffered on
 * per-subscription queues until dispatched by lcm_handle().  This function
 * how many messages are queued before dropping messages.
 *
 * @param subs the subscription to modify.
 * @param num_messages The maximum number of messages to queue
 *  on the subscription.
 * @return 0 on success, <0 if an error occured
 */
int lcmtypes_state_t_subscription_set_queue_capacity(lcmtypes_state_t_subscription_t* subs,
                              int num_messages);

/**
 * Encode a message of type lcmtypes_state_t into binary form.
 *
 * @param buf The output buffer.
 * @param offset Encoding starts at this byte offset into @p buf.
 * @param maxlen Maximum number of bytes to write.  This should generally
 *               be equal to lcmtypes_state_t_encoded_size().
 * @param msg The message to encode.
 * @return The number of bytes encoded, or <0 if an error occured.
 */
int lcmtypes_state_t_encode(void *buf, int offset, int maxlen, const lcmtypes_state_t *p);

/**
 * Decode a message of type lcmtypes_state_t from binary form.
 * When decoding messages containing strings or variable-length arrays, this
 * function may allocate memory.  When finished with the decoded message,
 * release allocated resources with lcmtypes_state_t_decode_cleanup().
 *
 * @param buf The buffer containing the encoded message
 * @param offset The byte offset into @p buf where the encoded message starts.
 * @param maxlen The maximum number of bytes to read while decoding.
 * @param msg Output parameter where the decoded message is stored
 * @return The number of bytes decoded, or <0 if an error occured.
 */
int lcmtypes_state_t_decode(const void *buf, int offset, int maxlen, lcmtypes_state_t *msg);

/**
 * Release resources allocated by lcmtypes_state_t_decode()
 * @return 0
 */
int lcmtypes_state_t_decode_cleanup(lcmtypes_state_t *p);

/**
 * Check how many bytes are required to encode a message of type lcmtypes_state_t
 */
int lcmtypes_state_t_encoded_size(const lcmtypes_state_t *p);

// LCM support functions. Users should not call these
int64_t __lcmtypes_state_t_get_hash(void);
uint64_t __lcmtypes_state_t_hash_recursive(const __lcm_hash_ptr *p);
int     __lcmtypes_state_t_encode_array(void *buf, int offset, int maxlen, const lcmtypes_state_t *p, int elements);
int     __lcmtypes_state_t_decode_array(const void *buf, int offset, int maxlen, lcmtypes_state_t *p, int elements);
int     __lcmtypes_state_t_decode_array_cleanup(lcmtypes_state_t *p, int elements);
int     __lcmtypes_state_t_encoded_array_size(const lcmtypes_state_t *p, int elements);
int     __lcmtypes_state_t_clone_array(const lcmtypes_state_t *p, lcmtypes_state_t *q, int elements);

#ifdef __cplusplus
}
#endif

#endif


================================================
FILE: data_generation/lcmtypes/lcmtypes/c/lcmtypes/lcmtypes_trajectory_t.c
================================================
// THIS IS AN AUTOMATICALLY GENERATED FILE.  DO NOT MODIFY
// BY HAND!!
//
// Generated by lcm-gen

#include <string.h>
#include "lcmtypes/lcmtypes_trajectory_t.h"

static int __lcmtypes_trajectory_t_hash_computed;
static uint64_t __lcmtypes_trajectory_t_hash;

uint64_t __lcmtypes_trajectory_t_hash_recursive(const __lcm_hash_ptr *p)
{
    const __lcm_hash_ptr *fp;
    for (fp = p; fp != NULL; fp = fp->parent)
        if (fp->v == __lcmtypes_trajectory_t_get_hash)
            return 0;

    __lcm_hash_ptr cp;
    cp.parent =  p;
    cp.v = (void*)__lcmtypes_trajectory_t_get_hash;
    (void) cp;

    uint64_t hash = (uint64_t)0x67039c5ec5ece44fLL
         + __int32_t_hash_recursive(&cp)
         + __lcmtypes_state_t_hash_recursive(&cp)
        ;

    return (hash<<1) + ((hash>>63)&1);
}

int64_t __lcmtypes_trajectory_t_get_hash(void)
{
    if (!__lcmtypes_trajectory_t_hash_computed) {
        __lcmtypes_trajectory_t_hash = (int64_t)__lcmtypes_trajectory_t_hash_recursive(NULL);
        __lcmtypes_trajectory_t_hash_computed = 1;
    }

    return __lcmtypes_trajectory_t_hash;
}

int __lcmtypes_trajectory_t_encode_array(void *buf, int offset, int maxlen, const lcmtypes_trajectory_t *p, int elements)
{
    int pos = 0, element;
    int thislen;

    for (element = 0; element < elements; element++) {

        thislen = __int32_t_encode_array(buf, offset + pos, maxlen - pos, &(p[element].num_states), 1);
        if (thislen < 0) return thislen; else pos += thislen;

        thislen = __lcmtypes_state_t_encode_array(buf, offset + pos, maxlen - pos, p[element].states, p[element].num_states);
        if (thislen < 0) return thislen; else pos += thislen;

    }
    return pos;
}

int lcmtypes_trajectory_t_encode(void *buf, int offset, int maxlen, const lcmtypes_trajectory_t *p)
{
    int pos = 0, thislen;
    int64_t hash = __lcmtypes_trajectory_t_get_hash();

    thislen = __int64_t_encode_array(buf, offset + pos, maxlen - pos, &hash, 1);
    if (thislen < 0) return thislen; else pos += thislen;

    thislen = __lcmtypes_trajectory_t_encode_array(buf, offset + pos, maxlen - pos, p, 1);
    if (thislen < 0) return thislen; else pos += thislen;

    return pos;
}

int __lcmtypes_trajectory_t_encoded_array_size(const lcmtypes_trajectory_t *p, int elements)
{
    int size = 0, element;
    for (element = 0; element < elements; element++) {

        size += __int32_t_encoded_array_size(&(p[element].num_states), 1);

        size += __lcmtypes_state_t_encoded_array_size(p[element].states, p[element].num_states);

    }
    return size;
}

int lcmtypes_trajectory_t_encoded_size(const lcmtypes_trajectory_t *p)
{
    return 8 + __lcmtypes_trajectory_t_encoded_array_size(p, 1);
}

int __lcmtypes_trajectory_t_decode_array(const void *buf, int offset, int maxlen, lcmtypes_trajectory_t *p, int elements)
{
    int pos = 0, thislen, element;

    for (element = 0; element < elements; element++) {

        thislen = __int32_t_decode_array(buf, offset + pos, maxlen - pos, &(p[element].num_states), 1);
        if (thislen < 0) return thislen; else pos += thislen;

        p[element].states = (lcmtypes_state_t*) lcm_malloc(sizeof(lcmtypes_state_t) * p[element].num_states);
        thislen = __lcmtypes_state_t_decode_array(buf, offset + pos, maxlen - pos, p[element].states, p[element].num_states);
        if (thislen < 0) return thislen; else pos += thislen;

    }
    return pos;
}

int __lcmtypes_trajectory_t_decode_array_cleanup(lcmtypes_trajectory_t *p, int elements)
{
    int element;
    for (element = 0; element < elements; element++) {

        __int32_t_decode_array_cleanup(&(p[element].num_states), 1);

        __lcmtypes_state_t_decode_array_cleanup(p[element].states, p[element].num_states);
        if (p[element].states) free(p[element].states);

    }
    return 0;
}

int lcmtypes_trajectory_t_decode(const void *buf, int offset, int maxlen, lcmtypes_trajectory_t *p)
{
    int pos = 0, thislen;
    int64_t hash = __lcmtypes_trajectory_t_get_hash();

    int64_t this_hash;
    thislen = __int64_t_decode_array(buf, offset + pos, maxlen - pos, &this_hash, 1);
    if (thislen < 0) return thislen; else pos += thislen;
    if (this_hash != hash) return -1;

    thislen = __lcmtypes_trajectory_t_decode_array(buf, offset + pos, maxlen - pos, p, 1);
    if (thislen < 0) return thislen; else pos += thislen;

    return pos;
}

int lcmtypes_trajectory_t_decode_cleanup(lcmtypes_trajectory_t *p)
{
    return __lcmtypes_trajectory_t_decode_array_cleanup(p, 1);
}

int __lcmtypes_trajectory_t_clone_array(const lcmtypes_trajectory_t *p, lcmtypes_trajectory_t *q, int elements)
{
    int element;
    for (element = 0; element < elements; element++) {

        __int32_t_clone_array(&(p[element].num_states), &(q[element].num_states), 1);

        q[element].states = (lcmtypes_state_t*) lcm_malloc(sizeof(lcmtypes_state_t) * q[element].num_states);
        __lcmtypes_state_t_clone_array(p[element].states, q[element].states, p[element].num_states);

    }
    return 0;
}

lcmtypes_trajectory_t *lcmtypes_trajectory_t_copy(const lcmtypes_trajectory_t *p)
{
    lcmtypes_trajectory_t *q = (lcmtypes_trajectory_t*) malloc(sizeof(lcmtypes_trajectory_t));
    __lcmtypes_trajectory_t_clone_array(p, q, 1);
    return q;
}

void lcmtypes_trajectory_t_destroy(lcmtypes_trajectory_t *p)
{
    __lcmtypes_trajectory_t_decode_array_cleanup(p, 1);
    free(p);
}

int lcmtypes_trajectory_t_publish(lcm_t *lc, const char *channel, const lcmtypes_trajectory_t *p)
{
      int max_data_size = lcmtypes_trajectory_t_encoded_size (p);
      uint8_t *buf = (uint8_t*) malloc (max_data_size);
      if (!buf) return -1;
      int data_size = lcmtypes_trajectory_t_encode (buf, 0, max_data_size, p);
      if (data_size < 0) {
          free (buf);
          return data_size;
      }
      int status = lcm_publish (lc, channel, buf, data_size);
      free (buf);
      return status;
}

struct _lcmtypes_trajectory_t_subscription_t {
    lcmtypes_trajectory_t_handler_t user_handler;
    void *userdata;
    lcm_subscription_t *lc_h;
};
static
void lcmtypes_trajectory_t_handler_stub (const lcm_recv_buf_t *rbuf,
                            const char *channel, void *userdata)
{
    int status;
    lcmtypes_trajectory_t p;
    memset(&p, 0, sizeof(lcmtypes_trajectory_t));
    status = lcmtypes_trajectory_t_decode (rbuf->data, 0, rbuf->data_size, &p);
    if (status < 0) {
        fprintf (stderr, "error %d decoding lcmtypes_trajectory_t!!!\n", status);
        return;
    }

    lcmtypes_trajectory_t_subscription_t *h = (lcmtypes_trajectory_t_subscription_t*) userdata;
    h->user_handler (rbuf, channel, &p, h->userdata);

    lcmtypes_trajectory_t_decode_cleanup (&p);
}

lcmtypes_trajectory_t_subscription_t* lcmtypes_trajectory_t_subscribe (lcm_t *lcm,
                    const char *channel,
                    lcmtypes_trajectory_t_handler_t f, void *userdata)
{
    lcmtypes_trajectory_t_subscription_t *n = (lcmtypes_trajectory_t_subscription_t*)
                       malloc(sizeof(lcmtypes_trajectory_t_subscription_t));
    n->user_handler = f;
    n->userdata = userdata;
    n->lc_h = lcm_subscribe (lcm, channel,
                                 lcmtypes_trajectory_t_handler_stub, n);
    if (n->lc_h == NULL) {
        fprintf (stderr,"couldn't reg lcmtypes_trajectory_t LCM handler!\n");
        free (n);
        return NULL;
    }
    return n;
}

int lcmtypes_trajectory_t_subscription_set_queue_capacity (lcmtypes_trajectory_t_subscription_t* subs,
                              int num_messages)
{
    return lcm_subscription_set_queue_capacity (subs->lc_h, num_messages);
}

int lcmtypes_trajectory_t_unsubscribe(lcm_t *lcm, lcmtypes_trajectory_t_subscription_t* hid)
{
    int status = lcm_unsubscribe (lcm, hid->lc_h);
    if (0 != status) {
        fprintf(stderr,
           "couldn't unsubscribe lcmtypes_trajectory_t_handler %p!\n", hid);
        return -1;
    }
    free (hid);
    return 0;
}



================================================
FILE: data_generation/lcmtypes/lcmtypes/c/lcmtypes/lcmtypes_trajectory_t.h
================================================
// THIS IS AN AUTOMATICALLY GENERATED FILE.  DO NOT MODIFY
// BY HAND!!
//
// Generated by lcm-gen

#include <stdint.h>
#include <stdlib.h>
#include <lcm/lcm_coretypes.h>
#include <lcm/lcm.h>

#ifndef _lcmtypes_trajectory_t_h
#define _lcmtypes_trajectory_t_h

#ifdef __cplusplus
extern "C" {
#endif

#include "lcmtypes/lcmtypes_state_t.h"
typedef struct _lcmtypes_trajectory_t lcmtypes_trajectory_t;
struct _lcmtypes_trajectory_t
{
    int32_t    num_states;
    lcmtypes_state_t *states;
};

/**
 * Create a deep copy of a lcmtypes_trajectory_t.
 * When no longer needed, destroy it with lcmtypes_trajectory_t_destroy()
 */
lcmtypes_trajectory_t* lcmtypes_trajectory_t_copy(const lcmtypes_trajectory_t* to_copy);

/**
 * Destroy an instance of lcmtypes_trajectory_t created by lcmtypes_trajectory_t_copy()
 */
void lcmtypes_trajectory_t_destroy(lcmtypes_trajectory_t* to_destroy);

/**
 * Identifies a single subscription.  This is an opaque data type.
 */
typedef struct _lcmtypes_trajectory_t_subscription_t lcmtypes_trajectory_t_subscription_t;

/**
 * Prototype for a callback function invoked when a message of type
 * lcmtypes_trajectory_t is received.
 */
typedef void(*lcmtypes_trajectory_t_handler_t)(const lcm_recv_buf_t *rbuf,
             const char *channel, const lcmtypes_trajectory_t *msg, void *userdata);

/**
 * Publish a message of type lcmtypes_trajectory_t using LCM.
 *
 * @param lcm The LCM instance to publish with.
 * @param channel The channel to publish on.
 * @param msg The message to publish.
 * @return 0 on success, <0 on error.  Success means LCM has transferred
 * responsibility of the message data to the OS.
 */
int lcmtypes_trajectory_t_publish(lcm_t *lcm, const char *channel, const lcmtypes_trajectory_t *msg);

/**
 * Subscribe to messages of type lcmtypes_trajectory_t using LCM.
 *
 * @param lcm The LCM instance to subscribe with.
 * @param channel The channel to subscribe to.
 * @param handler The callback function invoked by LCM when a message is received.
 *                This function is invoked by LCM during calls to lcm_handle() and
 *                lcm_handle_timeout().
 * @param userdata An opaque pointer passed to @p handler when it is invoked.
 * @return 0 on success, <0 if an error occured
 */
lcmtypes_trajectory_t_subscription_t* lcmtypes_trajectory_t_subscribe(lcm_t *lcm, const char *channel, lcmtypes_trajectory_t_handler_t handler, void *userdata);

/**
 * Removes and destroys a subscription created by lcmtypes_trajectory_t_subscribe()
 */
int lcmtypes_trajectory_t_unsubscribe(lcm_t *lcm, lcmtypes_trajectory_t_subscription_t* hid);

/**
 * Sets the queue capacity for a subscription.
 * Some LCM providers (e.g., the default multicast provider) are implemented
 * using a background receive thread that constantly revceives messages from
 * the network.  As these messages are received, they are buffered on
 * per-subscription queues until dispatched by lcm_handle().  This function
 * how many messages are queued before dropping messages.
 *
 * @param subs the subscription to modify.
 * @param num_messages The maximum number of messages to queue
 *  on the subscription.
 * @return 0 on success, <0 if an error occured
 */
int lcmtypes_trajectory_t_subscription_set_queue_capacity(lcmtypes_trajectory_t_subscription_t* subs,
                              int num_messages);

/**
 * Encode a message of type lcmtypes_trajectory_t into binary form.
 *
 * @param buf The output buffer.
 * @param offset Encoding starts at this byte offset into @p buf.
 * @param maxlen Maximum number of bytes to write.  This should generally
 *               be equal to lcmtypes_trajectory_t_encoded_size().
 * @param msg The message to encode.
 * @return The number of bytes encoded, or <0 if an error occured.
 */
int lcmtypes_trajectory_t_encode(void *buf, int offset, int maxlen, const lcmtypes_trajectory_t *p);

/**
 * Decode a message of type lcmtypes_trajectory_t from binary form.
 * When decoding messages containing strings or variable-length arrays, this
 * function may allocate memory.  When finished with the decoded message,
 * release allocated resources with lcmtypes_trajectory_t_decode_cleanup().
 *
 * @param buf The buffer containing the encoded message
 * @param offset The byte offset into @p buf where the encoded message starts.
 * @param maxlen The maximum number of bytes to read while decoding.
 * @param msg Output parameter where the decoded message is stored
 * @return The number of bytes decoded, or <0 if an error occured.
 */
int lcmtypes_trajectory_t_decode(const void *buf, int offset, int maxlen, lcmtypes_trajectory_t *msg);

/**
 * Release resources allocated by lcmtypes_trajectory_t_decode()
 * @return 0
 */
int lcmtypes_trajectory_t_decode_cleanup(lcmtypes_trajectory_t *p);

/**
 * Check how many bytes are required to encode a message of type lcmtypes_trajectory_t
 */
int lcmtypes_trajectory_t_encoded_size(const lcmtypes_trajectory_t *p);

// LCM support functions. Users should not call these
int64_t __lcmtypes_trajectory_t_get_hash(void);
uint64_t __lcmtypes_trajectory_t_hash_recursive(const __lcm_hash_ptr *p);
int     __lcmtypes_trajectory_t_encode_array(void *buf, int offset, int maxlen, const lcmtypes_trajectory_t *p, int elements);
int     __lcmtypes_trajectory_t_decode_array(const void *buf, int offset, int maxlen, lcmtypes_trajectory_t *p, int elements);
int     __lcmtypes_trajectory_t_decode_array_cleanup(lcmtypes_trajectory_t *p, int elements);
int     __lcmtypes_trajectory_t_encoded_array_size(const lcmtypes_trajectory_t *p, int elements);
int     __lcmtypes_trajectory_t_clone_array(const lcmtypes_trajectory_t *p, lcmtypes_trajectory_t *q, int elements);

#ifdef __cplusplus
}
#endif

#endif


================================================
FILE: data_generation/lcmtypes/lcmtypes/c/lcmtypes/lcmtypes_vertex_t.c
================================================
// THIS IS AN AUTOMATICALLY GENERATED FILE.  DO NOT MODIFY
// BY HAND!!
//
// Generated by lcm-gen

#include <string.h>
#include "lcmtypes/lcmtypes_vertex_t.h"

static int __lcmtypes_vertex_t_hash_computed;
static uint64_t __lcmtypes_vertex_t_hash;

uint64_t __lcmtypes_vertex_t_hash_recursive(const __lcm_hash_ptr *p)
{
    const __lcm_hash_ptr *fp;
    for (fp = p; fp != NULL; fp = fp->parent)
        if (fp->v == __lcmtypes_vertex_t_get_hash)
            return 0;

    __lcm_hash_ptr cp;
    cp.parent =  p;
    cp.v = (void*)__lcmtypes_vertex_t_get_hash;
    (void) cp;

    uint64_t hash = (uint64_t)0x780573746198cdacLL
         + __lcmtypes_state_t_hash_recursive(&cp)
        ;

    return (hash<<1) + ((hash>>63)&1);
}

int64_t __lcmtypes_vertex_t_get_hash(void)
{
    if (!__lcmtypes_vertex_t_hash_computed) {
        __lcmtypes_vertex_t_hash = (int64_t)__lcmtypes_vertex_t_hash_recursive(NULL);
        __lcmtypes_vertex_t_hash_computed = 1;
    }

    return __lcmtypes_vertex_t_hash;
}

int __lcmtypes_vertex_t_encode_array(void *buf, int offset, int maxlen, const lcmtypes_vertex_t *p, int elements)
{
    int pos = 0, element;
    int thislen;

    for (element = 0; element < elements; element++) {

        thislen = __lcmtypes_state_t_encode_array(buf, offset + pos, maxlen - pos, &(p[element].state), 1);
        if (thislen < 0) return thislen; else pos += thislen;

    }
    return pos;
}

int lcmtypes_vertex_t_encode(void *buf, int offset, int maxlen, const lcmtypes_vertex_t *p)
{
    int pos = 0, thislen;
    int64_t hash = __lcmtypes_vertex_t_get_hash();

    thislen = __int64_t_encode_array(buf, offset + pos, maxlen - pos, &hash, 1);
    if (thislen < 0) return thislen; else pos += thislen;

    thislen = __lcmtypes_vertex_t_encode_array(buf, offset + pos, maxlen - pos, p, 1);
    if (thislen < 0) return thislen; else pos += thislen;

    return pos;
}

int __lcmtypes_vertex_t_encoded_array_size(const lcmtypes_vertex_t *p, int elements)
{
    int size = 0, element;
    for (element = 0; element < elements; element++) {

        size += __lcmtypes_state_t_encoded_array_size(&(p[element].state), 1);

    }
    return size;
}

int lcmtypes_vertex_t_encoded_size(const lcmtypes_vertex_t *p)
{
    return 8 + __lcmtypes_vertex_t_encoded_array_size(p, 1);
}

int __lcmtypes_vertex_t_decode_array(const void *buf, int offset, int maxlen, lcmtypes_vertex_t *p, int elements)
{
    int pos = 0, thislen, element;

    for (element = 0; element < elements; element++) {

        thislen = __lcmtypes_state_t_decode_array(buf, offset + pos, maxlen - pos, &(p[element].state), 1);
        if (thislen < 0) return thislen; else pos += thislen;

    }
    return pos;
}

int __lcmtypes_vertex_t_decode_array_cleanup(lcmtypes_vertex_t *p, int elements)
{
    int element;
    for (element = 0; element < elements; element++) {

        __lcmtypes_state_t_decode_array_cleanup(&(p[element].state), 1);

    }
    return 0;
}

int lcmtypes_vertex_t_decode(const void *buf, int offset, int maxlen, lcmtypes_vertex_t *p)
{
    int pos = 0, thislen;
    int64_t hash = __lcmtypes_vertex_t_get_hash();

    int64_t this_hash;
    thislen = __int64_t_decode_array(buf, offset + pos, maxlen - pos, &this_hash, 1);
    if (thislen < 0) return thislen; else pos += thislen;
    if (this_hash != hash) return -1;

    thislen = __lcmtypes_vertex_t_decode_array(buf, offset + pos, maxlen - pos, p, 1);
    if (thislen < 0) return thislen; else pos += thislen;

    return pos;
}

int lcmtypes_vertex_t_decode_cleanup(lcmtypes_vertex_t *p)
{
    return __lcmtypes_vertex_t_decode_array_cleanup(p, 1);
}

int __lcmtypes_vertex_t_clone_array(const lcmtypes_vertex_t *p, lcmtypes_vertex_t *q, int elements)
{
    int element;
    for (element = 0; element < elements; element++) {

        __lcmtypes_state_t_clone_array(&(p[element].state), &(q[element].state), 1);

    }
    return 0;
}

lcmtypes_vertex_t *lcmtypes_vertex_t_copy(const lcmtypes_vertex_t *p)
{
    lcmtypes_vertex_t *q = (lcmtypes_vertex_t*) malloc(sizeof(lcmtypes_vertex_t));
    __lcmtypes_vertex_t_clone_array(p, q, 1);
    return q;
}

void lcmtypes_vertex_t_destroy(lcmtypes_vertex_t *p)
{
    __lcmtypes_vertex_t_decode_array_cleanup(p, 1);
    free(p);
}

int lcmtypes_vertex_t_publish(lcm_t *lc, const char *channel, const lcmtypes_vertex_t *p)
{
      int max_data_size = lcmtypes_vertex_t_encoded_size (p);
      uint8_t *buf = (uint8_t*) malloc (max_data_size);
      if (!buf) return -1;
      int data_size = lcmtypes_vertex_t_encode (buf, 0, max_data_size, p);
      if (data_size < 0) {
          free (buf);
          return data_size;
      }
      int status = lcm_publish (lc, channel, buf, data_size);
      free (buf);
      return status;
}

struct _lcmtypes_vertex_t_subscription_t {
    lcmtypes_vertex_t_handler_t user_handler;
    void *userdata;
    lcm_subscription_t *lc_h;
};
static
void lcmtypes_vertex_t_handler_stub (const lcm_recv_buf_t *rbuf,
                            const char *channel, void *userdata)
{
    int status;
    lcmtypes_vertex_t p;
    memset(&p, 0, sizeof(lcmtypes_vertex_t));
    status = lcmtypes_vertex_t_decode (rbuf->data, 0, rbuf->data_size, &p);
    if (status < 0) {
        fprintf (stderr, "error %d decoding lcmtypes_vertex_t!!!\n", status);
        return;
    }

    lcmtypes_vertex_t_subscription_t *h = (lcmtypes_vertex_t_subscription_t*) userdata;
    h->user_handler (rbuf, channel, &p, h->userdata);

    lcmtypes_vertex_t_decode_cleanup (&p);
}

lcmtypes_vertex_t_subscription_t* lcmtypes_vertex_t_subscribe (lcm_t *lcm,
                    const char *channel,
                    lcmtypes_vertex_t_handler_t f, void *userdata)
{
    lcmtypes_vertex_t_subscription_t *n = (lcmtypes_vertex_t_subscription_t*)
                       malloc(sizeof(lcmtypes_vertex_t_subscription_t));
    n->user_handler = f;
    n->userdata = userdata;
    n->lc_h = lcm_subscribe (lcm, channel,
                                 lcmtypes_vertex_t_handler_stub, n);
    if (n->lc_h == NULL) {
        fprintf (stderr,"couldn't reg lcmtypes_vertex_t LCM handler!\n");
        free (n);
        return NULL;
    }
    return n;
}

int lcmtypes_vertex_t_subscription_set_queue_capacity (lcmtypes_vertex_t_subscription_t* subs,
                              int num_messages)
{
    return lcm_subscription_set_queue_capacity (subs->lc_h, num_messages);
}

int lcmtypes_vertex_t_unsubscribe(lcm_t *lcm, lcmtypes_vertex_t_subscription_t* hid)
{
    int status = lcm_unsubscribe (lcm, hid->lc_h);
    if (0 != status) {
        fprintf(stderr,
           "couldn't unsubscribe lcmtypes_vertex_t_handler %p!\n", hid);
        return -1;
    }
    free (hid);
    return 0;
}



================================================
FILE: data_generation/lcmtypes/lcmtypes/c/lcmtypes/lcmtypes_vertex_t.h
================================================
// THIS IS AN AUTOMATICALLY GENERATED FILE.  DO NOT MODIFY
// BY HAND!!
//
// Generated by lcm-gen

#include <stdint.h>
#include <stdlib.h>
#include <lcm/lcm_coretypes.h>
#include <lcm/lcm.h>

#ifndef _lcmtypes_vertex_t_h
#define _lcmtypes_vertex_t_h

#ifdef __cplusplus
extern "C" {
#endif

#include "lcmtypes/lcmtypes_state_t.h"
typedef struct _lcmtypes_vertex_t lcmtypes_vertex_t;
struct _lcmtypes_vertex_t
{
    lcmtypes_state_t state;
};

/**
 * Create a deep copy of a lcmtypes_vertex_t.
 * When no longer needed, destroy it with lcmtypes_vertex_t_destroy()
 */
lcmtypes_vertex_t* lcmtypes_vertex_t_copy(const lcmtypes_vertex_t* to_copy);

/**
 * Destroy an instance of lcmtypes_vertex_t created by lcmtypes_vertex_t_copy()
 */
void lcmtypes_vertex_t_destroy(lcmtypes_vertex_t* to_destroy);

/**
 * Identifies a single subscription.  This is an opaque data type.
 */
typedef struct _lcmtypes_vertex_t_subscription_t lcmtypes_vertex_t_subscription_t;

/**
 * Prototype for a callback function invoked when a message of type
 * lcmtypes_vertex_t is received.
 */
typedef void(*lcmtypes_vertex_t_handler_t)(const lcm_recv_buf_t *rbuf,
             const char *channel, const lcmtypes_vertex_t *msg, void *userdata);

/**
 * Publish a message of type lcmtypes_vertex_t using LCM.
 *
 * @param lcm The LCM instance to publish with.
 * @param channel The channel to publish on.
 * @param msg The message to publish.
 * @return 0 on success, <0 on error.  Success means LCM has transferred
 * responsibility of the message data to the OS.
 */
int lcmtypes_vertex_t_publish(lcm_t *lcm, const char *channel, const lcmtypes_vertex_t *msg);

/**
 * Subscribe to messages of type lcmtypes_vertex_t using LCM.
 *
 * @param lcm The LCM instance to subscribe with.
 * @param channel The channel to subscribe to.
 * @param handler The callback function invoked by LCM when a message is received.
 *                This function is invoked by LCM during calls to lcm_handle() and
 *                lcm_handle_timeout().
 * @param userdata An opaque pointer passed to @p handler when it is invoked.
 * @return 0 on success, <0 if an error occured
 */
lcmtypes_vertex_t_subscription_t* lcmtypes_vertex_t_subscribe(lcm_t *lcm, const char *channel, lcmtypes_vertex_t_handler_t handler, void *userdata);

/**
 * Removes and destroys a subscription created by lcmtypes_vertex_t_subscribe()
 */
int lcmtypes_vertex_t_unsubscribe(lcm_t *lcm, lcmtypes_vertex_t_subscription_t* hid);

/**
 * Sets the queue capacity for a subscription.
 * Some LCM providers (e.g., the default multicast provider) are implemented
 * using a background receive thread that constantly revceives messages from
 * the network.  As these messages are received, they are buffered on
 * per-subscription queues until dispatched by lcm_handle().  This function
 * how many messages are queued before dropping messages.
 *
 * @param subs the subscription to modify.
 * @param num_messages The maximum number of messages to queue
 *  on the subscription.
 * @return 0 on success, <0 if an error occured
 */
int lcmtypes_vertex_t_subscription_set_queue_capacity(lcmtypes_vertex_t_subscription_t* subs,
                              int num_messages);

/**
 * Encode a message of type lcmtypes_vertex_t into binary form.
 *
 * @param buf The output buffer.
 * @param offset Encoding starts at this byte offset into @p buf.
 * @param maxlen Maximum number of bytes to write.  This should generally
 *               be equal to lcmtypes_vertex_t_encoded_size().
 * @param msg The message to encode.
 * @return The number of bytes encoded, or <0 if an error occured.
 */
int lcmtypes_vertex_t_encode(void *buf, int offset, int maxlen, const lcmtypes_vertex_t *p);

/**
 * Decode a message of type lcmtypes_vertex_t from binary form.
 * When decoding messages containing strings or variable-length arrays, this
 * function may allocate memory.  When finished with the decoded message,
 * release allocated resources with lcmtypes_vertex_t_decode_cleanup().
 *
 * @param buf The buffer containing the encoded message
 * @param offset The byte offset into @p buf where the encoded message starts.
 * @param maxlen The maximum number of bytes to read while decoding.
 * @param msg Output parameter where the decoded message is stored
 * @return The number of bytes decoded, or <0 if an error occured.
 */
int lcmtypes_vertex_t_decode(const void *buf, int offset, int maxlen, lcmtypes_vertex_t *msg);

/**
 * Release resources allocated by lcmtypes_vertex_t_decode()
 * @return 0
 */
int lcmtypes_vertex_t_decode_cleanup(lcmtypes_vertex_t *p);

/**
 * Check how many bytes are required to encode a message of type lcmtypes_vertex_t
 */
int lcmtypes_vertex_t_encoded_size(const lcmtypes_vertex_t *p);

// LCM support functions. Users should not call these
int64_t __lcmtypes_vertex_t_get_hash(void);
uint64_t __lcmtypes_vertex_t_hash_recursive(const __lcm_hash_ptr *p);
int     __lcmtypes_vertex_t_encode_array(void *buf, int offset, int maxlen, const lcmtypes_vertex_t *p, int elements);
int     __lcmtypes_vertex_t_decode_array(const void *buf, int offset, int maxlen, lcmtypes_vertex_t *p, int elements);
int     __lcmtypes_vertex_t_decode_array_cleanup(lcmtypes_vertex_t *p, int elements);
int     __lcmtypes_vertex_t_encoded_array_size(const lcmtypes_vertex_t *p, int elements);
int     __lcmtypes_vertex_t_clone_array(const lcmtypes_vertex_t *p, lcmtypes_vertex_t *q, int elements);

#ifdef __cplusplus
}
#endif

#endif


================================================
FILE: data_generation/lcmtypes/lcmtypes/java/lcmtypes/edge_t.java
================================================
/* LCM type definition class file
 * This file was automatically generated by lcm-gen
 * DO NOT MODIFY BY HAND!!!!
 */

package lcmtypes;
 
import java.io.*;
import java.util.*;
import lcm.lcm.*;
 
public final class edge_t implements lcm.lcm.LCMEncodable
{
    public lcmtypes.vertex_t vertex_src;
    public lcmtypes.vertex_t vertex_dst;
    public lcmtypes.trajectory_t trajectory;
 
    public edge_t()
    {
    }
 
    public static final long LCM_FINGERPRINT;
    public static final long LCM_FINGERPRINT_BASE = 0x1fae492d71eedf94L;
 
    static {
        LCM_FINGERPRINT = _hashRecursive(new ArrayList<Class<?>>());
    }
 
    public static long _hashRecursive(ArrayList<Class<?>> classes)
    {
        if (classes.contains(lcmtypes.edge_t.class))
            return 0L;
 
        classes.add(lcmtypes.edge_t.class);
        long hash = LCM_FINGERPRINT_BASE
             + lcmtypes.vertex_t._hashRecursive(classes)
             + lcmtypes.vertex_t._hashRecursive(classes)
             + lcmtypes.trajectory_t._hashRecursive(classes)
            ;
        classes.remove(classes.size() - 1);
        return (hash<<1) + ((hash>>63)&1);
    }
 
    public void encode(DataOutput outs) throws IOException
    {
        outs.writeLong(LCM_FINGERPRINT);
        _encodeRecursive(outs);
    }
 
    public void _encodeRecursive(DataOutput outs) throws IOException
    {
        this.vertex_src._encodeRecursive(outs); 
 
        this.vertex_dst._encodeRecursive(outs); 
 
        this.trajectory._encodeRecursive(outs); 
 
    }
 
    public edge_t(byte[] data) throws IOException
    {
        this(new LCMDataInputStream(data));
    }
 
    public edge_t(DataInput ins) throws IOException
    {
        if (ins.readLong() != LCM_FINGERPRINT)
            throw new IOException("LCM Decode error: bad fingerprint");
 
        _decodeRecursive(ins);
    }
 
    public static lcmtypes.edge_t _decodeRecursiveFactory(DataInput ins) throws IOException
    {
        lcmtypes.edge_t o = new lcmtypes.edge_t();
        o._decodeRecursive(ins);
        return o;
    }
 
    public void _decodeRecursive(DataInput ins) throws IOException
    {
        this.vertex_src = lcmtypes.vertex_t._decodeRecursiveFactory(ins);
 
        this.vertex_dst = lcmtypes.vertex_t._decodeRecursiveFactory(ins);
 
        this.trajectory = lcmtypes.trajectory_t._decodeRecursiveFactory(ins);
 
    }
 
    public lcmtypes.edge_t copy()
    {
        lcmtypes.edge_t outobj = new lcmtypes.edge_t();
        outobj.vertex_src = this.vertex_src.copy();
 
        outobj.vertex_dst = this.vertex_dst.copy();
 
        outobj.trajectory = this.trajectory.copy();
 
        return outobj;
    }
 
}



================================================
FILE: data_generation/lcmtypes/lcmtypes/java/lcmtypes/environment_t.java
================================================
/* LCM type definition class file
 * This file was automatically generated by lcm-gen
 * DO NOT MODIFY BY HAND!!!!
 */

package lcmtypes;
 
import java.io.*;
import java.util.*;
import lcm.lcm.*;
 
public final class environment_t implements lcm.lcm.LCMEncodable
{
    public lcmtypes.region_3d_t operating;
    public lcmtypes.region_3d_t goal;
    public int num_obstacles;
    public lcmtypes.region_3d_t obstacles[];
 
    public environment_t()
    {
    }
 
    public static final long LCM_FINGERPRINT;
    public static final long LCM_FINGERPRINT_BASE = 0x8caabc2a2ba0f9c7L;
 
    static {
        LCM_FINGERPRINT = _hashRecursive(new ArrayList<Class<?>>());
    }
 
    public static long _hashRecursive(ArrayList<Class<?>> classes)
    {
        if (classes.contains(lcmtypes.environment_t.class))
            return 0L;
 
        classes.add(lcmtypes.environment_t.class);
        long hash = LCM_FINGERPRINT_BASE
             + lcmtypes.region_3d_t._hashRecursive(classes)
             + lcmtypes.region_3d_t._hashRecursive(classes)
             + lcmtypes.region_3d_t._hashRecursive(classes)
            ;
        classes.remove(classes.size() - 1);
        return (hash<<1) + ((hash>>63)&1);
    }
 
    public void encode(DataOutput outs) throws IOException
    {
        outs.writeLong(LCM_FINGERPRINT);
        _encodeRecursive(outs);
    }
 
    public void _encodeRecursive(DataOutput outs) throws IOException
    {
        this.operating._encodeRecursive(outs); 
 
        this.goal._encodeRecursive(outs); 
 
        outs.writeInt(this.num_obstacles); 
 
        for (int a = 0; a < this.num_obstacles; a++) {
            this.obstacles[a]._encodeRecursive(outs); 
        }
 
    }
 
    public environment_t(byte[] data) throws IOException
    {
        this(new LCMDataInputStream(data));
    }
 
    public environment_t(DataInput ins) throws IOException
    {
        if (ins.readLong() != LCM_FINGERPRINT)
            throw new IOException("LCM Decode error: bad fingerprint");
 
        _decodeRecursive(ins);
    }
 
    public static lcmtypes.environment_t _decodeRecursiveFactory(DataInput ins) throws IOException
    {
        lcmtypes.environment_t o = new lcmtypes.environment_t();
        o._decodeRecursive(ins);
        return o;
    }
 
    public void _decodeRecursive(DataInput ins) throws IOException
    {
        this.operating = lcmtypes.region_3d_t._decodeRecursiveFactory(ins);
 
        this.goal = lcmtypes.region_3d_t._decodeRecursiveFactory(ins);
 
        this.num_obstacles = ins.readInt();
 
        this.obstacles = new lcmtypes.region_3d_t[(int) num_obstacles];
        for (int a = 0; a < this.num_obstacles; a++) {
            this.obstacles[a] = lcmtypes.region_3d_t._decodeRecursiveFactory(ins);
        }
 
    }
 
    public lcmtypes.environment_t copy()
    {
        lcmtypes.environment_t outobj = new lcmtypes.environment_t();
        outobj.operating = this.operating.copy();
 
        outobj.goal = this.goal.copy();
 
        outobj.num_obstacles = this.num_obstacles;
 
        outobj.obstacles = new lcmtypes.region_3d_t[(int) num_obstacles];
        for (int a = 0; a < this.num_obstacles; a++) {
            outobj.obstacles[a] = this.obstacles[a].copy();
        }
 
        return outobj;
    }
 
}



================================================
FILE: data_generation/lcmtypes/lcmtypes/java/lcmtypes/graph_t.java
================================================
/* LCM type definition class file
 * This file was automatically generated by lcm-gen
 * DO NOT MODIFY BY HAND!!!!
 */

package lcmtypes;
 
import java.io.*;
import java.util.*;
import lcm.lcm.*;
 
public final class graph_t implements lcm.lcm.LCMEncodable
{
    public int num_vertices;
    public lcmtypes.vertex_t vertices[];
    public int num_edges;
    public lcmtypes.edge_t edges[];
 
    public graph_t()
    {
    }
 
    public static final long LCM_FINGERPRINT;
    public static final long LCM_FINGERPRINT_BASE = 0x49189ad7b639b453L;
 
    static {
        LCM_FINGERPRINT = _hashRecursive(new ArrayList<Class<?>>());
    }
 
    public static long _hashRecursive(ArrayList<Class<?>> classes)
    {
        if (classes.contains(lcmtypes.graph_t.class))
            return 0L;
 
        classes.add(lcmtypes.graph_t.class);
        long hash = LCM_FINGERPRINT_BASE
             + lcmtypes.vertex_t._hashRecursive(classes)
             + lcmtypes.edge_t._hashRecursive(classes)
            ;
        classes.remove(classes.size() - 1);
        return (hash<<1) + ((hash>>63)&1);
    }
 
    public void encode(DataOutput outs) throws IOException
    {
        outs.writeLong(LCM_FINGERPRINT);
        _encodeRecursive(outs);
    }
 
    public void _encodeRecursive(DataOutput outs) throws IOException
    {
        outs.writeInt(this.num_vertices); 
 
        for (int a = 0; a < this.num_vertices; a++) {
            this.vertices[a]._encodeRecursive(outs); 
        }
 
        outs.writeInt(this.num_edges); 
 
        for (int a = 0; a < this.num_edges; a++) {
            this.edges[a]._encodeRecursive(outs); 
        }
 
    }
 
    public graph_t(byte[] data) throws IOException
    {
        this(new LCMDataInputStream(data));
    }
 
    public graph_t(DataInput ins) throws IOException
    {
        if (ins.readLong() != LCM_FINGERPRINT)
            throw new IOException("LCM Decode error: bad fingerprint");
 
        _decodeRecursive(ins);
    }
 
    public static lcmtypes.graph_t _decodeRecursiveFactory(DataInput ins) throws IOException
    {
        lcmtypes.graph_t o = new lcmtypes.graph_t();
        o._decodeRecursive(ins);
        return o;
    }
 
    public void _decodeRecursive(DataInput ins) throws IOException
    {
        this.num_vertices = ins.readInt();
 
        this.vertices = new lcmtypes.vertex_t[(int) num_vertices];
        for (int a = 0; a < this.num_vertices; a++) {
            this.vertices[a] = lcmtypes.vertex_t._decodeRecursiveFactory(ins);
        }
 
        this.num_edges = ins.readInt();
 
        this.edges = new lcmtypes.edge_t[(int) num_edges];
        for (int a = 0; a < this.num_edges; a++) {
            this.edges[a] = lcmtypes.edge_t._decodeRecursiveFactory(ins);
        }
 
    }
 
    public lcmtypes.graph_t copy()
    {
        lcmtypes.graph_t outobj = new lcmtypes.graph_t();
        outobj.num_vertices = this.num_vertices;
 
        outobj.vertices = new lcmtypes.vertex_t[(int) num_vertices];
        for (int a = 0; a < this.num_vertices; a++) {
            outobj.vertices[a] = this.vertices[a].copy();
        }
 
        outobj.num_edges = this.num_edges;
 
        outobj.edges = new lcmtypes.edge_t[(int) num_edges];
        for (int a = 0; a < this.num_edges; a++) {
            outobj.edges[a] = this.edges[a].copy();
        }
 
        return outobj;
    }
 
}



================================================
FILE: data_generation/lcmtypes/lcmtypes/java/lcmtypes/region_3d_t.java
================================================
/* LCM type definition class file
 * This file was automatically generated by lcm-gen
 * DO NOT MODIFY BY HAND!!!!
 */

package lcmtypes;
 
import java.io.*;
import java.util.*;
import lcm.lcm.*;
 
public final class region_3d_t implements lcm.lcm.LCMEncodable
{
    public double center[];
    public double size[];
 
    public region_3d_t()
    {
        center = new double[3];
        size = new double[3];
    }
 
    public static final long LCM_FINGERPRINT;
    public static final long LCM_FINGERPRINT_BASE = 0x94830fc8d7404191L;
 
    static {
        LCM_FINGERPRINT = _hashRecursive(new ArrayList<Class<?>>());
    }
 
    public static long _hashRecursive(ArrayList<Class<?>> classes)
    {
        if (classes.contains(lcmtypes.region_3d_t.class))
            return 0L;
 
        classes.add(lcmtypes.region_3d_t.class);
        long hash = LCM_FINGERPRINT_BASE
            ;
        classes.remove(classes.size() - 1);
        return (hash<<1) + ((hash>>63)&1);
    }
 
    public void encode(DataOutput outs) throws IOException
    {
        outs.writeLong(LCM_FINGERPRINT);
        _encodeRecursive(outs);
    }
 
    public void _encodeRecursive(DataOutput outs) throws IOException
    {
        for (int a = 0; a < 3; a++) {
            outs.writeDouble(this.center[a]); 
        }
 
        for (int a = 0; a < 3; a++) {
            outs.writeDouble(this.size[a]); 
        }
 
    }
 
    public region_3d_t(byte[] data) throws IOException
    {
        this(new LCMDataInputStream(data));
    }
 
    public region_3d_t(DataInput ins) throws IOException
    {
        if (ins.readLong() != LCM_FINGERPRINT)
            throw new IOException("LCM Decode error: bad fingerprint");
 
        _decodeRecursive(ins);
    }
 
    public static lcmtypes.region_3d_t _decodeRecursiveFactory(DataInput ins) throws IOException
    {
        lcmtypes.region_3d_t o = new lcmtypes.region_3d_t();
        o._decodeRecursive(ins);
        return o;
    }
 
    public void _decodeRecursive(DataInput ins) throws IOException
    {
        this.center = new double[(int) 3];
        for (int a = 0; a < 3; a++) {
            this.center[a] = ins.readDouble();
        }
 
        this.size = new double[(int) 3];
        for (int a = 0; a < 3; a++) {
            this.size[a] = ins.readDouble();
        }
 
    }
 
    public lcmtypes.region_3d_t copy()
    {
        lcmtypes.region_3d_t outobj = new lcmtypes.region_3d_t();
        outobj.center = new double[(int) 3];
        System.arraycopy(this.center, 0, outobj.center, 0, 3); 
        outobj.size = new double[(int) 3];
        System.arraycopy(this.size, 0, outobj.size, 0, 3); 
        return outobj;
    }
 
}



================================================
FILE: data_generation/lcmtypes/lcmtypes/java/lcmtypes/state_t.java
================================================
/* LCM type definition class file
 * This file was automatically generated by lcm-gen
 * DO NOT MODIFY BY HAND!!!!
 */

package lcmtypes;
 
import java.io.*;
import java.util.*;
import lcm.lcm.*;
 
public final class state_t implements lcm.lcm.LCMEncodable
{
    public double x;
    public double y;
    public double z;
 
    public state_t()
    {
    }
 
    public static final long LCM_FINGERPRINT;
    public static final long LCM_FINGERPRINT_BASE = 0x573f2fdd2f76508fL;
 
    static {
        LCM_FINGERPRINT = _hashRecursive(new ArrayList<Class<?>>());
    }
 
    public static long _hashRecursive(ArrayList<Class<?>> classes)
    {
        if (classes.contains(lcmtypes.state_t.class))
            return 0L;
 
        classes.add(lcmtypes.state_t.class);
        long hash = LCM_FINGERPRINT_BASE
            ;
        classes.remove(classes.size() - 1);
        return (hash<<1) + ((hash>>63)&1);
    }
 
    public void encode(DataOutput outs) throws IOException
    {
        outs.writeLong(LCM_FINGERPRINT);
        _encodeRecursive(outs);
    }
 
    public void _encodeRecursive(DataOutput outs) throws IOException
    {
        outs.writeDouble(this.x); 
 
        outs.writeDouble(this.y); 
 
        outs.writeDouble(this.z); 
 
    }
 
    public state_t(byte[] data) throws IOException
    {
        this(new LCMDataInputStream(data));
    }
 
    public state_t(DataInput ins) throws IOException
    {
        if (ins.readLong() != LCM_FINGERPRINT)
            throw new IOException("LCM Decode error: bad fingerprint");
 
        _decodeRecursive(ins);
    }
 
    public static lcmtypes.state_t _decodeRecursiveFactory(DataInput ins) throws IOException
    {
        lcmtypes.state_t o = new lcmtypes.state_t();
        o._decodeRecursive(ins);
        return o;
    }
 
    public void _decodeRecursive(DataInput ins) throws IOException
    {
        this.x = ins.readDouble();
 
        this.y = ins.readDouble();
 
        this.z = ins.readDouble();
 
    }
 
    public lcmtypes.state_t copy()
    {
        lcmtypes.state_t outobj = new lcmtypes.state_t();
        outobj.x = this.x;
 
        outobj.y = this.y;
 
        outobj.z = this.z;
 
        return outobj;
    }
 
}



================================================
FILE: data_generation/lcmtypes/lcmtypes/java/lcmtypes/trajectory_t.java
================================================
/* LCM type definition class file
 * This file was automatically generated by lcm-gen
 * DO NOT MODIFY BY HAND!!!!
 */

package lcmtypes;
 
import java.io.*;
import java.util.*;
import lcm.lcm.*;
 
public final class trajectory_t implements lcm.lcm.LCMEncodable
{
    public int num_states;
    public lcmtypes.state_t states[];
 
    public trajectory_t()
    {
    }
 
    public static final long LCM_FINGERPRINT;
    public static final long LCM_FINGERPRINT_BASE = 0x67039c5ec5ece44fL;
 
    static {
        LCM_FINGERPRINT = _hashRecursive(new ArrayList<Class<?>>());
    }
 
    public static long _hashRecursive(ArrayList<Class<?>> classes)
    {
        if (classes.contains(lcmtypes.trajectory_t.class))
            return 0L;
 
        classes.add(lcmtypes.trajectory_t.class);
        long hash = LCM_FINGERPRINT_BASE
             + lcmtypes.state_t._hashRecursive(classes)
            ;
        classes.remove(classes.size() - 1);
        return (hash<<1) + ((hash>>63)&1);
    }
 
    public void encode(DataOutput outs) throws IOException
    {
        outs.writeLong(LCM_FINGERPRINT);
        _encodeRecursive(outs);
    }
 
    public void _encodeRecursive(DataOutput outs) throws IOException
    {
        outs.writeInt(this.num_states); 
 
        for (int a = 0; a < this.num_states; a++) {
            this.states[a]._encodeRecursive(outs); 
        }
 
    }
 
    public trajectory_t(byte[] data) throws IOException
    {
        this(new LCMDataInputStream(data));
    }
 
    public trajectory_t(DataInput ins) throws IOException
    {
        if (ins.readLong() != LCM_FINGERPRINT)
            throw new IOException("LCM Decode error: bad fingerprint");
 
        _decodeRecursive(ins);
    }
 
    public static lcmtypes.trajectory_t _decodeRecursiveFactory(DataInput ins) throws IOException
    {
        lcmtypes.trajectory_t o = new lcmtypes.trajectory_t();
        o._decodeRecursive(ins);
        return o;
    }
 
    public void _decodeRecursive(DataInput ins) throws IOException
    {
        this.num_states = ins.readInt();
 
        this.states = new lcmtypes.state_t[(int) num_states];
        for (int a = 0; a < this.num_states; a++) {
            this.states[a] = lcmtypes.state_t._decodeRecursiveFactory(ins);
        }
 
    }
 
    public lcmtypes.trajectory_t copy()
    {
        lcmtypes.trajectory_t outobj = new lcmtypes.trajectory_t();
        outobj.num_states = this.num_states;
 
        outobj.states = new lcmtypes.state_t[(int) num_states];
        for (int a = 0; a < this.num_states; a++) {
            outobj.states[a] = this.states[a].copy();
        }
 
        return outobj;
    }
 
}



================================================
FILE: data_generation/lcmtypes/lcmtypes/java/lcmtypes/vertex_t.java
================================================
/* LCM type definition class file
 * This file was automatically generated by lcm-gen
 * DO NOT MODIFY BY HAND!!!!
 */

package lcmtypes;
 
import java.io.*;
import java.util.*;
import lcm.lcm.*;
 
public final class vertex_t implements lcm.lcm.LCMEncodable
{
    public lcmtypes.state_t state;
 
    public vertex_t()
    {
    }
 
    public static final long LCM_FINGERPRINT;
    public static final long LCM_FINGERPRINT_BASE = 0x780573746198cdacL;
 
    static {
        LCM_FINGERPRINT = _hashRecursive(new ArrayList<Class<?>>());
    }
 
    public static long _hashRecursive(ArrayList<Class<?>> classes)
    {
        if (classes.contains(lcmtypes.vertex_t.class))
            return 0L;
 
        classes.add(lcmtypes.vertex_t.class);
        long hash = LCM_FINGERPRINT_BASE
             + lcmtypes.state_t._hashRecursive(classes)
            ;
        classes.remove(classes.size() - 1);
        return (hash<<1) + ((hash>>63)&1);
    }
 
    public void encode(DataOutput outs) throws IOException
    {
        outs.writeLong(LCM_FINGERPRINT);
        _encodeRecursive(outs);
    }
 
    public void _encodeRecursive(DataOutput outs) throws IOException
    {
        this.state._encodeRecursive(outs); 
 
    }
 
    public vertex_t(byte[] data) throws IOException
    {
        this(new LCMDataInputStream(data));
    }
 
    public vertex_t(DataInput ins) throws IOException
    {
        if (ins.readLong() != LCM_FINGERPRINT)
            throw new IOException("LCM Decode error: bad fingerprint");
 
        _decodeRecursive(ins);
    }
 
    public static lcmtypes.vertex_t _decodeRecursiveFactory(DataInput ins) throws IOException
    {
        lcmtypes.vertex_t o = new lcmtypes.vertex_t();
        o._decodeRecursive(ins);
        return o;
    }
 
    public void _decodeRecursive(DataInput ins) throws IOException
    {
        this.state = lcmtypes.state_t._decodeRecursiveFactory(ins);
 
    }
 
    public lcmtypes.vertex_t copy()
    {
        lcmtypes.vertex_t outobj = new lcmtypes.vertex_t();
        outobj.state = this.state.copy();
 
        return outobj;
    }
 
}



================================================
FILE: data_generation/lcmtypes/lcmtypes/lcmtypes_edge_t.lcm
================================================
package lcmtypes;

struct edge_t {

    vertex_t vertex_src;
    vertex_t vertex_dst;
    trajectory_t trajectory;
}   

================================================
FILE: data_generation/lcmtypes/lcmtypes/lcmtypes_environment_t.lcm
================================================
package lcmtypes;

struct environment_t {
    region_3d_t operating;
    region_3d_t goal;

    int32_t num_obstacles;
    region_3d_t obstacles[num_obstacles];
}

================================================
FILE: data_generation/lcmtypes/lcmtypes/lcmtypes_graph_t.lcm
================================================
package lcmtypes;

struct graph_t {
    
    int32_t num_vertices;
    vertex_t vertices[num_vertices];

    int32_t num_edges;
    edge_t edges[num_edges];
}

================================================
FILE: data_generation/lcmtypes/lcmtypes/lcmtypes_region_3d_t.lcm
================================================
package lcmtypes;

struct region_3d_t {
    double center[3];
    double size[3];
}

================================================
FILE: data_generation/lcmtypes/lcmtypes/lcmtypes_state_t.lcm
================================================
package lcmtypes;

struct state_t {

    double x;
    double y;
    double z;
}

================================================
FILE: data_generation/lcmtypes/lcmtypes/lcmtypes_trajectory_t.lcm
================================================
package lcmtypes;

struct trajectory_t {
    
    int32_t num_states;
    state_t states[num_states];
}

================================================
FILE: data_generation/lcmtypes/lcmtypes/lcmtypes_vertex_t.lcm
================================================
package lcmtypes;

struct vertex_t {
    
    state_t state;
}

================================================
FILE: data_generation/lcmtypes/lcmtypes/python/lcmtypes/__init__.py
================================================
"""LCM package __init__.py file
This file automatically generated by lcm-gen.
DO NOT MODIFY BY HAND!!!!
"""

from .environment_t import environment_t
from .region_3d_t import region_3d_t
from .trajectory_t import trajectory_t
from .graph_t import graph_t
from .edge_t import edge_t
from .vertex_t import vertex_t
from .state_t import state_t


================================================
FILE: data_generation/lcmtypes/lcmtypes/python/lcmtypes/edge_t.py
================================================
"""LCM type definitions
This file automatically generated by lcm.
DO NOT MODIFY BY HAND!!!!
"""

try:
    import cStringIO.StringIO as BytesIO
except ImportError:
    from io import BytesIO
import struct

import lcmtypes.trajectory_t

import lcmtypes.vertex_t

class edge_t(object):
    __slots__ = ["vertex_src", "vertex_dst", "trajectory"]

    def __init__(self):
        self.vertex_src = lcmtypes.vertex_t()
        self.vertex_dst = lcmtypes.vertex_t()
        self.trajectory = lcmtypes.trajectory_t()

    def encode(self):
        buf = BytesIO()
        buf.write(edge_t._get_packed_fingerprint())
        self._encode_one(buf)
        return buf.getvalue()

    def _encode_one(self, buf):
        assert self.vertex_src._get_packed_fingerprint() == lcmtypes.vertex_t._get_packed_fingerprint()
        self.vertex_src._encode_one(buf)
        assert self.vertex_dst._get_packed_fingerprint() == lcmtypes.vertex_t._get_packed_fingerprint()
        self.vertex_dst._encode_one(buf)
        assert self.trajectory._get_packed_fingerprint() == lcmtypes.trajectory_t._get_packed_fingerprint()
        self.trajectory._encode_one(buf)

    def decode(data):
        if hasattr(data, 'read'):
            buf = data
        else:
            buf = BytesIO(data)
        if buf.read(8) != edge_t._get_packed_fingerprint():
            raise ValueError("Decode error")
        return edge_t._decode_one(buf)
    decode = staticmethod(decode)

    def _decode_one(buf):
        self = edge_t()
        self.vertex_src = lcmtypes.vertex_t._decode_one(buf)
        self.vertex_dst = lcmtypes.vertex_t._decode_one(buf)
        self.trajectory = lcmtypes.trajectory_t._decode_one(buf)
        return self
    _decode_one = staticmethod(_decode_one)

    _hash = None
    def _get_hash_recursive(parents):
        if edge_t in parents: return 0
        newparents = parents + [edge_t]
        tmphash = (0x1fae492d71eedf94+ lcmtypes.vertex_t._get_hash_recursive(newparents)+ lcmtypes.vertex_t._get_hash_recursive(newparents)+ lcmtypes.trajectory_t._get_hash_recursive(newparents)) & 0xffffffffffffffff
        tmphash  = (((tmphash<<1)&0xffffffffffffffff)  + (tmphash>>63)) & 0xffffffffffffffff
        return tmphash
    _get_hash_recursive = staticmethod(_get_hash_recursive)
    _packed_fingerprint = None

    def _get_packed_fingerprint():
        if edge_t._packed_fingerprint is None:
            edge_t._packed_fingerprint = struct.pack(">Q", edge_t._get_hash_recursive([]))
        return edge_t._packed_fingerprint
    _get_packed_fingerprint = staticmethod(_get_packed_fingerprint)



================================================
FILE: data_generation/lcmtypes/lcmtypes/python/lcmtypes/environment_t.py
================================================
"""LCM type definitions
This file automatically generated by lcm.
DO NOT MODIFY BY HAND!!!!
"""

try:
    import cStringIO.StringIO as BytesIO
except ImportError:
    from io import BytesIO
import struct

import lcmtypes.region_3d_t

class environment_t(object):
    __slots__ = ["operating", "goal", "num_obstacles", "obstacles"]

    def __init__(self):
        self.operating = lcmtypes.region_3d_t()
        self.goal = lcmtypes.region_3d_t()
        self.num_obstacles = 0
        self.obstacles = []

    def encode(self):
        buf = BytesIO()
        buf.write(environment_t._get_packed_fingerprint())
        self._encode_one(buf)
        return buf.getvalue()

    def _encode_one(self, buf):
        assert self.operating._get_packed_fingerprint() == lcmtypes.region_3d_t._get_packed_fingerprint()
        self.operating._encode_one(buf)
        assert self.goal._get_packed_fingerprint() == lcmtypes.region_3d_t._get_packed_fingerprint()
        self.goal._encode_one(buf)
        buf.write(struct.pack(">i", self.num_obstacles))
        for i0 in range(self.num_obstacles):
            assert self.obstacles[i0]._get_packed_fingerprint() == lcmtypes.region_3d_t._get_packed_fingerprint()
            self.obstacles[i0]._encode_one(buf)

    def decode(data):
        if hasattr(data, 'read'):
            buf = data
        else:
            buf = BytesIO(data)
        if buf.read(8) != environment_t._get_packed_fingerprint():
            raise ValueError("Decode error")
        return environment_t._decode_one(buf)
    decode = staticmethod(decode)

    def _decode_one(buf):
        self = environment_t()
        self.operating = lcmtypes.region_3d_t._decode_one(buf)
        self.goal = lcmtypes.region_3d_t._decode_one(buf)
        self.num_obstacles = struct.unpack(">i", buf.read(4))[0]
        self.obstacles = []
        for i0 in range(self.num_obstacles):
            self.obstacles.append(lcmtypes.region_3d_t._decode_one(buf))
        return self
    _decode_one = staticmethod(_decode_one)

    _hash = None
    def _get_hash_recursive(parents):
        if environment_t in parents: return 0
        newparents = parents + [environment_t]
        tmphash = (0x8caabc2a2ba0f9c7+ lcmtypes.region_3d_t._get_hash_recursive(newparents)+ lcmtypes.region_3d_t._get_hash_recursive(newparents)+ lcmtypes.region_3d_t._get_hash_recursive(newparents)) & 0xffffffffffffffff
        tmphash  = (((tmphash<<1)&0xffffffffffffffff)  + (tmphash>>63)) & 0xffffffffffffffff
        return tmphash
    _get_hash_recursive = staticmethod(_get_hash_recursive)
    _packed_fingerprint = None

    def _get_packed_fingerprint():
        if environment_t._packed_fingerprint is None:
            environment_t._packed_fingerprint = struct.pack(">Q", environment_t._get_hash_recursive([]))
        return environment_t._packed_fingerprint
    _get_packed_fingerprint = staticmethod(_get_packed_fingerprint)



================================================
FILE: data_generation/lcmtypes/lcmtypes/python/lcmtypes/graph_t.py
================================================
"""LCM type definitions
This file automatically generated by lcm.
DO NOT MODIFY BY HAND!!!!
"""

try:
    import cStringIO.StringIO as BytesIO
except ImportError:
    from io import BytesIO
import struct

import lcmtypes.vertex_t

import lcmtypes.edge_t

class graph_t(object):
    __slots__ = ["num_vertices", "vertices", "num_edges", "edges"]

    def __init__(self):
        self.num_vertices = 0
        self.vertices = []
        self.num_edges = 0
        self.edges = []

    def encode(self):
        buf = BytesIO()
        buf.write(graph_t._get_packed_fingerprint())
        self._encode_one(buf)
        return buf.getvalue()

    def _encode_one(self, buf):
        buf.write(struct.pack(">i", self.num_vertices))
        for i0 in range(self.num_vertices):
            assert self.vertices[i0]._get_packed_fingerprint() == lcmtypes.vertex_t._get_packed_fingerprint()
            self.vertices[i0]._encode_one(buf)
        buf.write(struct.pack(">i", self.num_edges))
        for i0 in range(self.num_edges):
            assert self.edges[i0]._get_packed_fingerprint() == lcmtypes.edge_t._get_packed_fingerprint()
            self.edges[i0]._encode_one(buf)

    def decode(data):
        if hasattr(data, 'read'):
            buf = data
        else:
            buf = BytesIO(data)
        if buf.read(8) != graph_t._get_packed_fingerprint():
            raise ValueError("Decode error")
        return graph_t._decode_one(buf)
    decode = staticmethod(decode)

    def _decode_one(buf):
        self = graph_t()
        self.num_vertices = struct.unpack(">i", buf.read(4))[0]
        self.vertices = []
        for i0 in range(self.num_vertices):
            self.vertices.append(lcmtypes.vertex_t._decode_one(buf))
        self.num_edges = struct.unpack(">i", buf.read(4))[0]
        self.edges = []
        for i0 in range(self.num_edges):
            self.edges.append(lcmtypes.edge_t._decode_one(buf))
        return self
    _decode_one = staticmethod(_decode_one)

    _hash = None
    def _get_hash_recursive(parents):
        if graph_t in parents: return 0
        newparents = parents + [graph_t]
        tmphash = (0x49189ad7b639b453+ lcmtypes.vertex_t._get_hash_recursive(newparents)+ lcmtypes.edge_t._get_hash_recursive(newparents)) & 0xffffffffffffffff
        tmphash  = (((tmphash<<1)&0xffffffffffffffff)  + (tmphash>>63)) & 0xffffffffffffffff
        return tmphash
    _get_hash_recursive = staticmethod(_get_hash_recursive)
    _packed_fingerprint = None

    def _get_packed_fingerprint():
        if graph_t._packed_fingerprint is None:
            graph_t._packed_fingerprint = struct.pack(">Q", graph_t._get_hash_recursive([]))
        return graph_t._packed_fingerprint
    _get_packed_fingerprint = staticmethod(_get_packed_fingerprint)



================================================
FILE: data_generation/lcmtypes/lcmtypes/python/lcmtypes/region_3d_t.py
================================================
"""LCM type definitions
This file automatically generated by lcm.
DO NOT MODIFY BY HAND!!!!
"""

try:
    import cStringIO.StringIO as BytesIO
except ImportError:
    from io import BytesIO
import struct

class region_3d_t(object):
    __slots__ = ["center", "size"]

    def __init__(self):
        self.center = [ 0.0 for dim0 in range(3) ]
        self.size = [ 0.0 for dim0 in range(3) ]

    def encode(self):
        buf = BytesIO()
        buf.write(region_3d_t._get_packed_fingerprint())
        self._encode_one(buf)
        return buf.getvalue()

    def _encode_one(self, buf):
        buf.write(struct.pack('>3d', *self.center[:3]))
        buf.write(struct.pack('>3d', *self.size[:3]))

    def decode(data):
        if hasattr(data, 'read'):
            buf = data
        else:
            buf = BytesIO(data)
        if buf.read(8) != region_3d_t._get_packed_fingerprint():
            raise ValueError("Decode error")
        return region_3d_t._decode_one(buf)
    decode = staticmethod(decode)

    def _decode_one(buf):
        self = region_3d_t()
        self.center = struct.unpack('>3d', buf.read(24))
        self.size = struct.unpack('>3d', buf.read(24))
        return self
    _decode_one = staticmethod(_decode_one)

    _hash = None
    def _get_hash_recursive(parents):
        if region_3d_t in parents: return 0
        tmphash = (0x94830fc8d7404191) & 0xffffffffffffffff
        tmphash  = (((tmphash<<1)&0xffffffffffffffff)  + (tmphash>>63)) & 0xffffffffffffffff
        return tmphash
    _get_hash_recursive = staticmethod(_get_hash_recursive)
    _packed_fingerprint = None

    def _get_packed_fingerprint():
        if region_3d_t._packed_fingerprint is None:
            region_3d_t._packed_fingerprint = struct.pack(">Q", region_3d_t._get_hash_recursive([]))
        return region_3d_t._packed_fingerprint
    _get_packed_fingerprint = staticmethod(_get_packed_fingerprint)



================================================
FILE: data_generation/lcmtypes/lcmtypes/python/lcmtypes/state_t.py
================================================
"""LCM type definitions
This file automatically generated by lcm.
DO NOT MODIFY BY HAND!!!!
"""

try:
    import cStringIO.StringIO as BytesIO
except ImportError:
    from io import BytesIO
import struct

class state_t(object):
    __slots__ = ["x", "y", "z"]

    def __init__(self):
        self.x = 0.0
        self.y = 0.0
        self.z = 0.0

    def encode(self):
        buf = BytesIO()
        buf.write(state_t._get_packed_fingerprint())
        self._encode_one(buf)
        return buf.getvalue()

    def _encode_one(self, buf):
        buf.write(struct.pack(">ddd", self.x, self.y, self.z))

    def decode(data):
        if hasattr(data, 'read'):
            buf = data
        else:
            buf = BytesIO(data)
        if buf.read(8) != state_t._get_packed_fingerprint():
            raise ValueError("Decode error")
        return state_t._decode_one(buf)
    decode = staticmethod(decode)

    def _decode_one(buf):
        self = state_t()
        self.x, self.y, self.z = struct.unpack(">ddd", buf.read(24))
        return self
    _decode_one = staticmethod(_decode_one)

    _hash = None
    def _get_hash_recursive(parents):
        if state_t in parents: return 0
        tmphash = (0x573f2fdd2f76508f) & 0xffffffffffffffff
        tmphash  = (((tmphash<<1)&0xffffffffffffffff)  + (tmphash>>63)) & 0xffffffffffffffff
        return tmphash
    _get_hash_recursive = staticmethod(_get_hash_recursive)
    _packed_fingerprint = None

    def _get_packed_fingerprint():
        if state_t._packed_fingerprint is None:
            state_t._packed_fingerprint = struct.pack(">Q", state_t._get_hash_recursive([]))
        return state_t._packed_fingerprint
    _get_packed_fingerprint = staticmethod(_get_packed_fingerprint)



================================================
FILE: data_generation/lcmtypes/lcmtypes/python/lcmtypes/trajectory_t.py
================================================
"""LCM type definitions
This file automatically generated by lcm.
DO NOT MODIFY BY HAND!!!!
"""

try:
    import cStringIO.StringIO as BytesIO
except ImportError:
    from io import BytesIO
import struct

import lcmtypes.state_t

class trajectory_t(object):
    __slots__ = ["num_states", "states"]

    def __init__(self):
        self.num_states = 0
        self.states = []

    def encode(self):
        buf = BytesIO()
        buf.write(trajectory_t._get_packed_fingerprint())
        self._encode_one(buf)
        return buf.getvalue()

    def _encode_one(self, buf):
        buf.write(struct.pack(">i", self.num_states))
        for i0 in range(self.num_states):
            assert self.states[i0]._get_packed_fingerprint() == lcmtypes.state_t._get_packed_fingerprint()
            self.states[i0]._encode_one(buf)

    def decode(data):
        if hasattr(data, 'read'):
            buf = data
        else:
            buf = BytesIO(data)
        if buf.read(8) != trajectory_t._get_packed_fingerprint():
            raise ValueError("Decode error")
        return trajectory_t._decode_one(buf)
    decode = staticmethod(decode)

    def _decode_one(buf):
        self = trajectory_t()
        self.num_states = struct.unpack(">i", buf.read(4))[0]
        self.states = []
        for i0 in range(self.num_states):
            self.states.append(lcmtypes.state_t._decode_one(buf))
        return self
    _decode_one = staticmethod(_decode_one)

    _hash = None
    def _get_hash_recursive(parents):
        if trajectory_t in parents: return 0
        newparents = parents + [trajectory_t]
        tmphash = (0x67039c5ec5ece44f+ lcmtypes.state_t._get_hash_recursive(newparents)) & 0xffffffffffffffff
        tmphash  = (((tmphash<<1)&0xffffffffffffffff)  + (tmphash>>63)) & 0xffffffffffffffff
        return tmphash
    _get_hash_recursive = staticmethod(_get_hash_recursive)
    _packed_fingerprint = None

    def _get_packed_fingerprint():
        if trajectory_t._packed_fingerprint is None:
            trajectory_t._packed_fingerprint = struct.pack(">Q", trajectory_t._get_hash_recursive([]))
        return trajectory_t._packed_fingerprint
    _get_packed_fingerprint = staticmethod(_get_packed_fingerprint)



================================================
FILE: data_generation/lcmtypes/lcmtypes/python/lcmtypes/vertex_t.py
================================================
"""LCM type definitions
This file automatically generated by lcm.
DO NOT MODIFY BY HAND!!!!
"""

try:
    import cStringIO.StringIO as BytesIO
except ImportError:
    from io import BytesIO
import struct

import lcmtypes.state_t

class vertex_t(object):
    __slots__ = ["state"]

    def __init__(self):
        self.state = lcmtypes.state_t()

    def encode(self):
        buf = BytesIO()
        buf.write(vertex_t._get_packed_fingerprint())
        self._encode_one(buf)
        return buf.getvalue()

    def _encode_one(self, buf):
        assert self.state._get_packed_fingerprint() == lcmtypes.state_t._get_packed_fingerprint()
        self.state._encode_one(buf)

    def decode(data):
        if hasattr(data, 'read'):
            buf = data
        else:
            buf = BytesIO(data)
        if buf.read(8) != vertex_t._get_packed_fingerprint():
            raise ValueError("Decode error")
        return vertex_t._decode_one(buf)
    decode = sta
Download .txt
gitextract_cfl6eb6l/

├── LICENSE
├── MPNet/
│   ├── AE/
│   │   ├── CAE.py
│   │   └── data_loader.py
│   ├── data_loader.py
│   ├── model.py
│   ├── neuralplanner.py
│   └── train.py
├── README.md
├── data_generation/
│   ├── Makefile
│   ├── README
│   ├── lcmtypes/
│   │   ├── CMakeLists.txt
│   │   ├── Makefile
│   │   ├── cmake/
│   │   │   ├── lcmtypes.cmake
│   │   │   └── pods.cmake
│   │   ├── lcmtypes/
│   │   │   ├── c/
│   │   │   │   └── lcmtypes/
│   │   │   │       ├── lcmtypes.h
│   │   │   │       ├── lcmtypes_edge_t.c
│   │   │   │       ├── lcmtypes_edge_t.h
│   │   │   │       ├── lcmtypes_environment_t.c
│   │   │   │       ├── lcmtypes_environment_t.h
│   │   │   │       ├── lcmtypes_graph_t.c
│   │   │   │       ├── lcmtypes_graph_t.h
│   │   │   │       ├── lcmtypes_region_3d_t.c
│   │   │   │       ├── lcmtypes_region_3d_t.h
│   │   │   │       ├── lcmtypes_state_t.c
│   │   │   │       ├── lcmtypes_state_t.h
│   │   │   │       ├── lcmtypes_trajectory_t.c
│   │   │   │       ├── lcmtypes_trajectory_t.h
│   │   │   │       ├── lcmtypes_vertex_t.c
│   │   │   │       └── lcmtypes_vertex_t.h
│   │   │   ├── java/
│   │   │   │   └── lcmtypes/
│   │   │   │       ├── edge_t.java
│   │   │   │       ├── environment_t.java
│   │   │   │       ├── graph_t.java
│   │   │   │       ├── region_3d_t.java
│   │   │   │       ├── state_t.java
│   │   │   │       ├── trajectory_t.java
│   │   │   │       └── vertex_t.java
│   │   │   ├── lcmtypes_edge_t.lcm
│   │   │   ├── lcmtypes_environment_t.lcm
│   │   │   ├── lcmtypes_graph_t.lcm
│   │   │   ├── lcmtypes_region_3d_t.lcm
│   │   │   ├── lcmtypes_state_t.lcm
│   │   │   ├── lcmtypes_trajectory_t.lcm
│   │   │   ├── lcmtypes_vertex_t.lcm
│   │   │   └── python/
│   │   │       └── lcmtypes/
│   │   │           ├── __init__.py
│   │   │           ├── edge_t.py
│   │   │           ├── environment_t.py
│   │   │           ├── graph_t.py
│   │   │           ├── region_3d_t.py
│   │   │           ├── state_t.py
│   │   │           ├── trajectory_t.py
│   │   │           └── vertex_t.py
│   │   └── pod.xml
│   ├── permute.cpp
│   ├── rrtstar/
│   │   ├── CMakeLists.txt
│   │   ├── Makefile
│   │   ├── cmake/
│   │   │   └── pods.cmake
│   │   ├── doxy/
│   │   │   └── doxy.conf
│   │   └── src/
│   │       ├── CMakeLists.txt
│   │       ├── CMakeLists.txt~
│   │       ├── kdtree.c
│   │       ├── kdtree.h
│   │       ├── rrts.h
│   │       ├── rrts.hpp
│   │       ├── rrts_main.cpp
│   │       ├── system.h
│   │       ├── system_single_integrator.cpp
│   │       └── system_single_integrator.h
│   ├── tobuild.txt
│   └── viewer/
│       ├── CMakeLists.txt
│       ├── Makefile
│       ├── README
│       ├── cmake/
│       │   └── pods.cmake
│       └── src/
│           ├── CMakeLists.txt
│           ├── main_viewer.cpp
│           └── renderers/
│               ├── CMakeLists.txt
│               ├── graph_renderer.cpp
│               ├── graph_renderer.h
│               └── graph_renderer.h~
├── readme
└── visualizer.py
Download .txt
SYMBOL INDEX (450 symbols across 46 files)

FILE: MPNet/AE/CAE.py
  class Encoder (line 10) | class Encoder(nn.Module):
    method __init__ (line 11) | def __init__(self):
    method forward (line 15) | def forward(self, x):
  class Decoder (line 19) | class Decoder(nn.Module):
    method __init__ (line 20) | def __init__(self):
    method forward (line 23) | def forward(self, x):
  function loss_function (line 31) | def loss_function(W, x, recons_x, h):
  function main (line 41) | def main(args):

FILE: MPNet/AE/data_loader.py
  function load_dataset (line 12) | def load_dataset(N=30000,NP=1800):

FILE: MPNet/data_loader.py
  class Encoder (line 16) | class Encoder(nn.Module):
    method __init__ (line 17) | def __init__(self):
    method forward (line 21) | def forward(self, x):
  function load_dataset (line 26) | def load_dataset(N=100,NP=4000):
  function load_test_dataset (line 102) | def load_test_dataset(N=100,NP=200, s=0,sp=4000):

FILE: MPNet/model.py
  class MLP (line 9) | class MLP(nn.Module):
    method __init__ (line 10) | def __init__(self, input_size, output_size):
    method forward (line 27) | def forward(self, x):

FILE: MPNet/neuralplanner.py
  function IsInCollision (line 25) | def IsInCollision(x,idx):
  function steerTo (line 40) | def steerTo (start, end, idx):
  function feasibility_check (line 80) | def feasibility_check(path,idx):
  function collision_check (line 90) | def collision_check(path,idx):
  function to_var (line 97) | def to_var(x, volatile=False):
  function get_input (line 102) | def get_input(i,dataset,targets,seq,bs):
  function is_reaching_target (line 114) | def is_reaching_target(start1,start2):
  function lvc (line 130) | def lvc(path,idx):
  function re_iterate_path2 (line 147) | def re_iterate_path2(p,g,idx,obs):
  function replan_path (line 183) | def replan_path(p,g,idx,obs):
  function main (line 237) | def main(args):

FILE: MPNet/train.py
  function to_var (line 12) | def to_var(x, volatile=False):
  function get_input (line 17) | def get_input(i,data,targets,bs):
  function main (line 30) | def main(args):

FILE: data_generation/lcmtypes/lcmtypes/c/lcmtypes/lcmtypes_edge_t.c
  function __lcmtypes_edge_t_hash_recursive (line 12) | uint64_t __lcmtypes_edge_t_hash_recursive(const __lcm_hash_ptr *p)
  function __lcmtypes_edge_t_get_hash (line 33) | int64_t __lcmtypes_edge_t_get_hash(void)
  function __lcmtypes_edge_t_encode_array (line 43) | int __lcmtypes_edge_t_encode_array(void *buf, int offset, int maxlen, co...
  function lcmtypes_edge_t_encode (line 63) | int lcmtypes_edge_t_encode(void *buf, int offset, int maxlen, const lcmt...
  function __lcmtypes_edge_t_encoded_array_size (line 77) | int __lcmtypes_edge_t_encoded_array_size(const lcmtypes_edge_t *p, int e...
  function lcmtypes_edge_t_encoded_size (line 92) | int lcmtypes_edge_t_encoded_size(const lcmtypes_edge_t *p)
  function __lcmtypes_edge_t_decode_array (line 97) | int __lcmtypes_edge_t_decode_array(const void *buf, int offset, int maxl...
  function __lcmtypes_edge_t_decode_array_cleanup (line 116) | int __lcmtypes_edge_t_decode_array_cleanup(lcmtypes_edge_t *p, int eleme...
  function lcmtypes_edge_t_decode (line 131) | int lcmtypes_edge_t_decode(const void *buf, int offset, int maxlen, lcmt...
  function lcmtypes_edge_t_decode_cleanup (line 147) | int lcmtypes_edge_t_decode_cleanup(lcmtypes_edge_t *p)
  function __lcmtypes_edge_t_clone_array (line 152) | int __lcmtypes_edge_t_clone_array(const lcmtypes_edge_t *p, lcmtypes_edg...
  function lcmtypes_edge_t (line 167) | lcmtypes_edge_t *lcmtypes_edge_t_copy(const lcmtypes_edge_t *p)
  function lcmtypes_edge_t_destroy (line 174) | void lcmtypes_edge_t_destroy(lcmtypes_edge_t *p)
  function lcmtypes_edge_t_publish (line 180) | int lcmtypes_edge_t_publish(lcm_t *lc, const char *channel, const lcmtyp...
  type _lcmtypes_edge_t_subscription_t (line 195) | struct _lcmtypes_edge_t_subscription_t {
  function lcmtypes_edge_t_handler_stub (line 200) | static
  function lcmtypes_edge_t_subscription_t (line 219) | lcmtypes_edge_t_subscription_t* lcmtypes_edge_t_subscribe (lcm_t *lcm,
  function lcmtypes_edge_t_subscription_set_queue_capacity (line 237) | int lcmtypes_edge_t_subscription_set_queue_capacity (lcmtypes_edge_t_sub...
  function lcmtypes_edge_t_unsubscribe (line 243) | int lcmtypes_edge_t_unsubscribe(lcm_t *lcm, lcmtypes_edge_t_subscription...

FILE: data_generation/lcmtypes/lcmtypes/c/lcmtypes/lcmtypes_edge_t.h
  type lcmtypes_edge_t (line 21) | typedef struct _lcmtypes_edge_t lcmtypes_edge_t;
  type _lcmtypes_edge_t (line 22) | struct _lcmtypes_edge_t
  type lcmtypes_edge_t_subscription_t (line 43) | typedef struct _lcmtypes_edge_t_subscription_t lcmtypes_edge_t_subscript...

FILE: data_generation/lcmtypes/lcmtypes/c/lcmtypes/lcmtypes_environment_t.c
  function __lcmtypes_environment_t_hash_recursive (line 12) | uint64_t __lcmtypes_environment_t_hash_recursive(const __lcm_hash_ptr *p)
  function __lcmtypes_environment_t_get_hash (line 34) | int64_t __lcmtypes_environment_t_get_hash(void)
  function __lcmtypes_environment_t_encode_array (line 44) | int __lcmtypes_environment_t_encode_array(void *buf, int offset, int max...
  function lcmtypes_environment_t_encode (line 67) | int lcmtypes_environment_t_encode(void *buf, int offset, int maxlen, con...
  function __lcmtypes_environment_t_encoded_array_size (line 81) | int __lcmtypes_environment_t_encoded_array_size(const lcmtypes_environme...
  function lcmtypes_environment_t_encoded_size (line 98) | int lcmtypes_environment_t_encoded_size(const lcmtypes_environment_t *p)
  function __lcmtypes_environment_t_decode_array (line 103) | int __lcmtypes_environment_t_decode_array(const void *buf, int offset, i...
  function __lcmtypes_environment_t_decode_array_cleanup (line 126) | int __lcmtypes_environment_t_decode_array_cleanup(lcmtypes_environment_t...
  function lcmtypes_environment_t_decode (line 144) | int lcmtypes_environment_t_decode(const void *buf, int offset, int maxle...
  function lcmtypes_environment_t_decode_cleanup (line 160) | int lcmtypes_environment_t_decode_cleanup(lcmtypes_environment_t *p)
  function __lcmtypes_environment_t_clone_array (line 165) | int __lcmtypes_environment_t_clone_array(const lcmtypes_environment_t *p...
  function lcmtypes_environment_t (line 183) | lcmtypes_environment_t *lcmtypes_environment_t_copy(const lcmtypes_envir...
  function lcmtypes_environment_t_destroy (line 190) | void lcmtypes_environment_t_destroy(lcmtypes_environment_t *p)
  function lcmtypes_environment_t_publish (line 196) | int lcmtypes_environment_t_publish(lcm_t *lc, const char *channel, const...
  type _lcmtypes_environment_t_subscription_t (line 211) | struct _lcmtypes_environment_t_subscription_t {
  function lcmtypes_environment_t_handler_stub (line 216) | static
  function lcmtypes_environment_t_subscription_t (line 235) | lcmtypes_environment_t_subscription_t* lcmtypes_environment_t_subscribe ...
  function lcmtypes_environment_t_subscription_set_queue_capacity (line 253) | int lcmtypes_environment_t_subscription_set_queue_capacity (lcmtypes_env...
  function lcmtypes_environment_t_unsubscribe (line 259) | int lcmtypes_environment_t_unsubscribe(lcm_t *lcm, lcmtypes_environment_...

FILE: data_generation/lcmtypes/lcmtypes/c/lcmtypes/lcmtypes_environment_t.h
  type lcmtypes_environment_t (line 21) | typedef struct _lcmtypes_environment_t lcmtypes_environment_t;
  type _lcmtypes_environment_t (line 22) | struct _lcmtypes_environment_t
  type lcmtypes_environment_t_subscription_t (line 44) | typedef struct _lcmtypes_environment_t_subscription_t lcmtypes_environme...

FILE: data_generation/lcmtypes/lcmtypes/c/lcmtypes/lcmtypes_graph_t.c
  function __lcmtypes_graph_t_hash_recursive (line 12) | uint64_t __lcmtypes_graph_t_hash_recursive(const __lcm_hash_ptr *p)
  function __lcmtypes_graph_t_get_hash (line 34) | int64_t __lcmtypes_graph_t_get_hash(void)
  function __lcmtypes_graph_t_encode_array (line 44) | int __lcmtypes_graph_t_encode_array(void *buf, int offset, int maxlen, c...
  function lcmtypes_graph_t_encode (line 67) | int lcmtypes_graph_t_encode(void *buf, int offset, int maxlen, const lcm...
  function __lcmtypes_graph_t_encoded_array_size (line 81) | int __lcmtypes_graph_t_encoded_array_size(const lcmtypes_graph_t *p, int...
  function lcmtypes_graph_t_encoded_size (line 98) | int lcmtypes_graph_t_encoded_size(const lcmtypes_graph_t *p)
  function __lcmtypes_graph_t_decode_array (line 103) | int __lcmtypes_graph_t_decode_array(const void *buf, int offset, int max...
  function __lcmtypes_graph_t_decode_array_cleanup (line 127) | int __lcmtypes_graph_t_decode_array_cleanup(lcmtypes_graph_t *p, int ele...
  function lcmtypes_graph_t_decode (line 146) | int lcmtypes_graph_t_decode(const void *buf, int offset, int maxlen, lcm...
  function lcmtypes_graph_t_decode_cleanup (line 162) | int lcmtypes_graph_t_decode_cleanup(lcmtypes_graph_t *p)
  function __lcmtypes_graph_t_clone_array (line 167) | int __lcmtypes_graph_t_clone_array(const lcmtypes_graph_t *p, lcmtypes_g...
  function lcmtypes_graph_t (line 186) | lcmtypes_graph_t *lcmtypes_graph_t_copy(const lcmtypes_graph_t *p)
  function lcmtypes_graph_t_destroy (line 193) | void lcmtypes_graph_t_destroy(lcmtypes_graph_t *p)
  function lcmtypes_graph_t_publish (line 199) | int lcmtypes_graph_t_publish(lcm_t *lc, const char *channel, const lcmty...
  type _lcmtypes_graph_t_subscription_t (line 214) | struct _lcmtypes_graph_t_subscription_t {
  function lcmtypes_graph_t_handler_stub (line 219) | static
  function lcmtypes_graph_t_subscription_t (line 238) | lcmtypes_graph_t_subscription_t* lcmtypes_graph_t_subscribe (lcm_t *lcm,
  function lcmtypes_graph_t_subscription_set_queue_capacity (line 256) | int lcmtypes_graph_t_subscription_set_queue_capacity (lcmtypes_graph_t_s...
  function lcmtypes_graph_t_unsubscribe (line 262) | int lcmtypes_graph_t_unsubscribe(lcm_t *lcm, lcmtypes_graph_t_subscripti...

FILE: data_generation/lcmtypes/lcmtypes/c/lcmtypes/lcmtypes_graph_t.h
  type lcmtypes_graph_t (line 20) | typedef struct _lcmtypes_graph_t lcmtypes_graph_t;
  type _lcmtypes_graph_t (line 21) | struct _lcmtypes_graph_t
  type lcmtypes_graph_t_subscription_t (line 43) | typedef struct _lcmtypes_graph_t_subscription_t lcmtypes_graph_t_subscri...

FILE: data_generation/lcmtypes/lcmtypes/c/lcmtypes/lcmtypes_region_3d_t.c
  function __lcmtypes_region_3d_t_hash_recursive (line 12) | uint64_t __lcmtypes_region_3d_t_hash_recursive(const __lcm_hash_ptr *p)
  function __lcmtypes_region_3d_t_get_hash (line 32) | int64_t __lcmtypes_region_3d_t_get_hash(void)
  function __lcmtypes_region_3d_t_encode_array (line 42) | int __lcmtypes_region_3d_t_encode_array(void *buf, int offset, int maxle...
  function lcmtypes_region_3d_t_encode (line 59) | int lcmtypes_region_3d_t_encode(void *buf, int offset, int maxlen, const...
  function __lcmtypes_region_3d_t_encoded_array_size (line 73) | int __lcmtypes_region_3d_t_encoded_array_size(const lcmtypes_region_3d_t...
  function lcmtypes_region_3d_t_encoded_size (line 86) | int lcmtypes_region_3d_t_encoded_size(const lcmtypes_region_3d_t *p)
  function __lcmtypes_region_3d_t_decode_array (line 91) | int __lcmtypes_region_3d_t_decode_array(const void *buf, int offset, int...
  function __lcmtypes_region_3d_t_decode_array_cleanup (line 107) | int __lcmtypes_region_3d_t_decode_array_cleanup(lcmtypes_region_3d_t *p,...
  function lcmtypes_region_3d_t_decode (line 120) | int lcmtypes_region_3d_t_decode(const void *buf, int offset, int maxlen,...
  function lcmtypes_region_3d_t_decode_cleanup (line 136) | int lcmtypes_region_3d_t_decode_cleanup(lcmtypes_region_3d_t *p)
  function __lcmtypes_region_3d_t_clone_array (line 141) | int __lcmtypes_region_3d_t_clone_array(const lcmtypes_region_3d_t *p, lc...
  function lcmtypes_region_3d_t (line 154) | lcmtypes_region_3d_t *lcmtypes_region_3d_t_copy(const lcmtypes_region_3d...
  function lcmtypes_region_3d_t_destroy (line 161) | void lcmtypes_region_3d_t_destroy(lcmtypes_region_3d_t *p)
  function lcmtypes_region_3d_t_publish (line 167) | int lcmtypes_region_3d_t_publish(lcm_t *lc, const char *channel, const l...
  type _lcmtypes_region_3d_t_subscription_t (line 182) | struct _lcmtypes_region_3d_t_subscription_t {
  function lcmtypes_region_3d_t_handler_stub (line 187) | static
  function lcmtypes_region_3d_t_subscription_t (line 206) | lcmtypes_region_3d_t_subscription_t* lcmtypes_region_3d_t_subscribe (lcm...
  function lcmtypes_region_3d_t_subscription_set_queue_capacity (line 224) | int lcmtypes_region_3d_t_subscription_set_queue_capacity (lcmtypes_regio...
  function lcmtypes_region_3d_t_unsubscribe (line 230) | int lcmtypes_region_3d_t_unsubscribe(lcm_t *lcm, lcmtypes_region_3d_t_su...

FILE: data_generation/lcmtypes/lcmtypes/c/lcmtypes/lcmtypes_region_3d_t.h
  type lcmtypes_region_3d_t (line 18) | typedef struct _lcmtypes_region_3d_t lcmtypes_region_3d_t;
  type _lcmtypes_region_3d_t (line 19) | struct _lcmtypes_region_3d_t
  type lcmtypes_region_3d_t_subscription_t (line 39) | typedef struct _lcmtypes_region_3d_t_subscription_t lcmtypes_region_3d_t...

FILE: data_generation/lcmtypes/lcmtypes/c/lcmtypes/lcmtypes_state_t.c
  function __lcmtypes_state_t_hash_recursive (line 12) | uint64_t __lcmtypes_state_t_hash_recursive(const __lcm_hash_ptr *p)
  function __lcmtypes_state_t_get_hash (line 33) | int64_t __lcmtypes_state_t_get_hash(void)
  function __lcmtypes_state_t_encode_array (line 43) | int __lcmtypes_state_t_encode_array(void *buf, int offset, int maxlen, c...
  function lcmtypes_state_t_encode (line 63) | int lcmtypes_state_t_encode(void *buf, int offset, int maxlen, const lcm...
  function __lcmtypes_state_t_encoded_array_size (line 77) | int __lcmtypes_state_t_encoded_array_size(const lcmtypes_state_t *p, int...
  function lcmtypes_state_t_encoded_size (line 92) | int lcmtypes_state_t_encoded_size(const lcmtypes_state_t *p)
  function __lcmtypes_state_t_decode_array (line 97) | int __lcmtypes_state_t_decode_array(const void *buf, int offset, int max...
  function __lcmtypes_state_t_decode_array_cleanup (line 116) | int __lcmtypes_state_t_decode_array_cleanup(lcmtypes_state_t *p, int ele...
  function lcmtypes_state_t_decode (line 131) | int lcmtypes_state_t_decode(const void *buf, int offset, int maxlen, lcm...
  function lcmtypes_state_t_decode_cleanup (line 147) | int lcmtypes_state_t_decode_cleanup(lcmtypes_state_t *p)
  function __lcmtypes_state_t_clone_array (line 152) | int __lcmtypes_state_t_clone_array(const lcmtypes_state_t *p, lcmtypes_s...
  function lcmtypes_state_t (line 167) | lcmtypes_state_t *lcmtypes_state_t_copy(const lcmtypes_state_t *p)
  function lcmtypes_state_t_destroy (line 174) | void lcmtypes_state_t_destroy(lcmtypes_state_t *p)
  function lcmtypes_state_t_publish (line 180) | int lcmtypes_state_t_publish(lcm_t *lc, const char *channel, const lcmty...
  type _lcmtypes_state_t_subscription_t (line 195) | struct _lcmtypes_state_t_subscription_t {
  function lcmtypes_state_t_handler_stub (line 200) | static
  function lcmtypes_state_t_subscription_t (line 219) | lcmtypes_state_t_subscription_t* lcmtypes_state_t_subscribe (lcm_t *lcm,
  function lcmtypes_state_t_subscription_set_queue_capacity (line 237) | int lcmtypes_state_t_subscription_set_queue_capacity (lcmtypes_state_t_s...
  function lcmtypes_state_t_unsubscribe (line 243) | int lcmtypes_state_t_unsubscribe(lcm_t *lcm, lcmtypes_state_t_subscripti...

FILE: data_generation/lcmtypes/lcmtypes/c/lcmtypes/lcmtypes_state_t.h
  type lcmtypes_state_t (line 18) | typedef struct _lcmtypes_state_t lcmtypes_state_t;
  type _lcmtypes_state_t (line 19) | struct _lcmtypes_state_t
  type lcmtypes_state_t_subscription_t (line 40) | typedef struct _lcmtypes_state_t_subscription_t lcmtypes_state_t_subscri...

FILE: data_generation/lcmtypes/lcmtypes/c/lcmtypes/lcmtypes_trajectory_t.c
  function __lcmtypes_trajectory_t_hash_recursive (line 12) | uint64_t __lcmtypes_trajectory_t_hash_recursive(const __lcm_hash_ptr *p)
  function __lcmtypes_trajectory_t_get_hash (line 32) | int64_t __lcmtypes_trajectory_t_get_hash(void)
  function __lcmtypes_trajectory_t_encode_array (line 42) | int __lcmtypes_trajectory_t_encode_array(void *buf, int offset, int maxl...
  function lcmtypes_trajectory_t_encode (line 59) | int lcmtypes_trajectory_t_encode(void *buf, int offset, int maxlen, cons...
  function __lcmtypes_trajectory_t_encoded_array_size (line 73) | int __lcmtypes_trajectory_t_encoded_array_size(const lcmtypes_trajectory...
  function lcmtypes_trajectory_t_encoded_size (line 86) | int lcmtypes_trajectory_t_encoded_size(const lcmtypes_trajectory_t *p)
  function __lcmtypes_trajectory_t_decode_array (line 91) | int __lcmtypes_trajectory_t_decode_array(const void *buf, int offset, in...
  function __lcmtypes_trajectory_t_decode_array_cleanup (line 108) | int __lcmtypes_trajectory_t_decode_array_cleanup(lcmtypes_trajectory_t *...
  function lcmtypes_trajectory_t_decode (line 122) | int lcmtypes_trajectory_t_decode(const void *buf, int offset, int maxlen...
  function lcmtypes_trajectory_t_decode_cleanup (line 138) | int lcmtypes_trajectory_t_decode_cleanup(lcmtypes_trajectory_t *p)
  function __lcmtypes_trajectory_t_clone_array (line 143) | int __lcmtypes_trajectory_t_clone_array(const lcmtypes_trajectory_t *p, ...
  function lcmtypes_trajectory_t (line 157) | lcmtypes_trajectory_t *lcmtypes_trajectory_t_copy(const lcmtypes_traject...
  function lcmtypes_trajectory_t_destroy (line 164) | void lcmtypes_trajectory_t_destroy(lcmtypes_trajectory_t *p)
  function lcmtypes_trajectory_t_publish (line 170) | int lcmtypes_trajectory_t_publish(lcm_t *lc, const char *channel, const ...
  type _lcmtypes_trajectory_t_subscription_t (line 185) | struct _lcmtypes_trajectory_t_subscription_t {
  function lcmtypes_trajectory_t_handler_stub (line 190) | static
  function lcmtypes_trajectory_t_subscription_t (line 209) | lcmtypes_trajectory_t_subscription_t* lcmtypes_trajectory_t_subscribe (l...
  function lcmtypes_trajectory_t_subscription_set_queue_capacity (line 227) | int lcmtypes_trajectory_t_subscription_set_queue_capacity (lcmtypes_traj...
  function lcmtypes_trajectory_t_unsubscribe (line 233) | int lcmtypes_trajectory_t_unsubscribe(lcm_t *lcm, lcmtypes_trajectory_t_...

FILE: data_generation/lcmtypes/lcmtypes/c/lcmtypes/lcmtypes_trajectory_t.h
  type lcmtypes_trajectory_t (line 19) | typedef struct _lcmtypes_trajectory_t lcmtypes_trajectory_t;
  type _lcmtypes_trajectory_t (line 20) | struct _lcmtypes_trajectory_t
  type lcmtypes_trajectory_t_subscription_t (line 40) | typedef struct _lcmtypes_trajectory_t_subscription_t lcmtypes_trajectory...

FILE: data_generation/lcmtypes/lcmtypes/c/lcmtypes/lcmtypes_vertex_t.c
  function __lcmtypes_vertex_t_hash_recursive (line 12) | uint64_t __lcmtypes_vertex_t_hash_recursive(const __lcm_hash_ptr *p)
  function __lcmtypes_vertex_t_get_hash (line 31) | int64_t __lcmtypes_vertex_t_get_hash(void)
  function __lcmtypes_vertex_t_encode_array (line 41) | int __lcmtypes_vertex_t_encode_array(void *buf, int offset, int maxlen, ...
  function lcmtypes_vertex_t_encode (line 55) | int lcmtypes_vertex_t_encode(void *buf, int offset, int maxlen, const lc...
  function __lcmtypes_vertex_t_encoded_array_size (line 69) | int __lcmtypes_vertex_t_encoded_array_size(const lcmtypes_vertex_t *p, i...
  function lcmtypes_vertex_t_encoded_size (line 80) | int lcmtypes_vertex_t_encoded_size(const lcmtypes_vertex_t *p)
  function __lcmtypes_vertex_t_decode_array (line 85) | int __lcmtypes_vertex_t_decode_array(const void *buf, int offset, int ma...
  function __lcmtypes_vertex_t_decode_array_cleanup (line 98) | int __lcmtypes_vertex_t_decode_array_cleanup(lcmtypes_vertex_t *p, int e...
  function lcmtypes_vertex_t_decode (line 109) | int lcmtypes_vertex_t_decode(const void *buf, int offset, int maxlen, lc...
  function lcmtypes_vertex_t_decode_cleanup (line 125) | int lcmtypes_vertex_t_decode_cleanup(lcmtypes_vertex_t *p)
  function __lcmtypes_vertex_t_clone_array (line 130) | int __lcmtypes_vertex_t_clone_array(const lcmtypes_vertex_t *p, lcmtypes...
  function lcmtypes_vertex_t (line 141) | lcmtypes_vertex_t *lcmtypes_vertex_t_copy(const lcmtypes_vertex_t *p)
  function lcmtypes_vertex_t_destroy (line 148) | void lcmtypes_vertex_t_destroy(lcmtypes_vertex_t *p)
  function lcmtypes_vertex_t_publish (line 154) | int lcmtypes_vertex_t_publish(lcm_t *lc, const char *channel, const lcmt...
  type _lcmtypes_vertex_t_subscription_t (line 169) | struct _lcmtypes_vertex_t_subscription_t {
  function lcmtypes_vertex_t_handler_stub (line 174) | static
  function lcmtypes_vertex_t_subscription_t (line 193) | lcmtypes_vertex_t_subscription_t* lcmtypes_vertex_t_subscribe (lcm_t *lcm,
  function lcmtypes_vertex_t_subscription_set_queue_capacity (line 211) | int lcmtypes_vertex_t_subscription_set_queue_capacity (lcmtypes_vertex_t...
  function lcmtypes_vertex_t_unsubscribe (line 217) | int lcmtypes_vertex_t_unsubscribe(lcm_t *lcm, lcmtypes_vertex_t_subscrip...

FILE: data_generation/lcmtypes/lcmtypes/c/lcmtypes/lcmtypes_vertex_t.h
  type lcmtypes_vertex_t (line 19) | typedef struct _lcmtypes_vertex_t lcmtypes_vertex_t;
  type _lcmtypes_vertex_t (line 20) | struct _lcmtypes_vertex_t
  type lcmtypes_vertex_t_subscription_t (line 39) | typedef struct _lcmtypes_vertex_t_subscription_t lcmtypes_vertex_t_subsc...

FILE: data_generation/lcmtypes/lcmtypes/java/lcmtypes/edge_t.java
  class edge_t (line 12) | public final class edge_t implements lcm.lcm.LCMEncodable
    method edge_t (line 18) | public edge_t()
    method _hashRecursive (line 29) | public static long _hashRecursive(ArrayList<Class<?>> classes)
    method encode (line 44) | public void encode(DataOutput outs) throws IOException
    method _encodeRecursive (line 50) | public void _encodeRecursive(DataOutput outs) throws IOException
    method edge_t (line 60) | public edge_t(byte[] data) throws IOException
    method edge_t (line 65) | public edge_t(DataInput ins) throws IOException
    method _decodeRecursiveFactory (line 73) | public static lcmtypes.edge_t _decodeRecursiveFactory(DataInput ins) t...
    method _decodeRecursive (line 80) | public void _decodeRecursive(DataInput ins) throws IOException
    method copy (line 90) | public lcmtypes.edge_t copy()

FILE: data_generation/lcmtypes/lcmtypes/java/lcmtypes/environment_t.java
  class environment_t (line 12) | public final class environment_t implements lcm.lcm.LCMEncodable
    method environment_t (line 19) | public environment_t()
    method _hashRecursive (line 30) | public static long _hashRecursive(ArrayList<Class<?>> classes)
    method encode (line 45) | public void encode(DataOutput outs) throws IOException
    method _encodeRecursive (line 51) | public void _encodeRecursive(DataOutput outs) throws IOException
    method environment_t (line 65) | public environment_t(byte[] data) throws IOException
    method environment_t (line 70) | public environment_t(DataInput ins) throws IOException
    method _decodeRecursiveFactory (line 78) | public static lcmtypes.environment_t _decodeRecursiveFactory(DataInput...
    method _decodeRecursive (line 85) | public void _decodeRecursive(DataInput ins) throws IOException
    method copy (line 100) | public lcmtypes.environment_t copy()

FILE: data_generation/lcmtypes/lcmtypes/java/lcmtypes/graph_t.java
  class graph_t (line 12) | public final class graph_t implements lcm.lcm.LCMEncodable
    method graph_t (line 19) | public graph_t()
    method _hashRecursive (line 30) | public static long _hashRecursive(ArrayList<Class<?>> classes)
    method encode (line 44) | public void encode(DataOutput outs) throws IOException
    method _encodeRecursive (line 50) | public void _encodeRecursive(DataOutput outs) throws IOException
    method graph_t (line 66) | public graph_t(byte[] data) throws IOException
    method graph_t (line 71) | public graph_t(DataInput ins) throws IOException
    method _decodeRecursiveFactory (line 79) | public static lcmtypes.graph_t _decodeRecursiveFactory(DataInput ins) ...
    method _decodeRecursive (line 86) | public void _decodeRecursive(DataInput ins) throws IOException
    method copy (line 104) | public lcmtypes.graph_t copy()

FILE: data_generation/lcmtypes/lcmtypes/java/lcmtypes/region_3d_t.java
  class region_3d_t (line 12) | public final class region_3d_t implements lcm.lcm.LCMEncodable
    method region_3d_t (line 17) | public region_3d_t()
    method _hashRecursive (line 30) | public static long _hashRecursive(ArrayList<Class<?>> classes)
    method encode (line 42) | public void encode(DataOutput outs) throws IOException
    method _encodeRecursive (line 48) | public void _encodeRecursive(DataOutput outs) throws IOException
    method region_3d_t (line 60) | public region_3d_t(byte[] data) throws IOException
    method region_3d_t (line 65) | public region_3d_t(DataInput ins) throws IOException
    method _decodeRecursiveFactory (line 73) | public static lcmtypes.region_3d_t _decodeRecursiveFactory(DataInput i...
    method _decodeRecursive (line 80) | public void _decodeRecursive(DataInput ins) throws IOException
    method copy (line 94) | public lcmtypes.region_3d_t copy()

FILE: data_generation/lcmtypes/lcmtypes/java/lcmtypes/state_t.java
  class state_t (line 12) | public final class state_t implements lcm.lcm.LCMEncodable
    method state_t (line 18) | public state_t()
    method _hashRecursive (line 29) | public static long _hashRecursive(ArrayList<Class<?>> classes)
    method encode (line 41) | public void encode(DataOutput outs) throws IOException
    method _encodeRecursive (line 47) | public void _encodeRecursive(DataOutput outs) throws IOException
    method state_t (line 57) | public state_t(byte[] data) throws IOException
    method state_t (line 62) | public state_t(DataInput ins) throws IOException
    method _decodeRecursiveFactory (line 70) | public static lcmtypes.state_t _decodeRecursiveFactory(DataInput ins) ...
    method _decodeRecursive (line 77) | public void _decodeRecursive(DataInput ins) throws IOException
    method copy (line 87) | public lcmtypes.state_t copy()

FILE: data_generation/lcmtypes/lcmtypes/java/lcmtypes/trajectory_t.java
  class trajectory_t (line 12) | public final class trajectory_t implements lcm.lcm.LCMEncodable
    method trajectory_t (line 17) | public trajectory_t()
    method _hashRecursive (line 28) | public static long _hashRecursive(ArrayList<Class<?>> classes)
    method encode (line 41) | public void encode(DataOutput outs) throws IOException
    method _encodeRecursive (line 47) | public void _encodeRecursive(DataOutput outs) throws IOException
    method trajectory_t (line 57) | public trajectory_t(byte[] data) throws IOException
    method trajectory_t (line 62) | public trajectory_t(DataInput ins) throws IOException
    method _decodeRecursiveFactory (line 70) | public static lcmtypes.trajectory_t _decodeRecursiveFactory(DataInput ...
    method _decodeRecursive (line 77) | public void _decodeRecursive(DataInput ins) throws IOException
    method copy (line 88) | public lcmtypes.trajectory_t copy()

FILE: data_generation/lcmtypes/lcmtypes/java/lcmtypes/vertex_t.java
  class vertex_t (line 12) | public final class vertex_t implements lcm.lcm.LCMEncodable
    method vertex_t (line 16) | public vertex_t()
    method _hashRecursive (line 27) | public static long _hashRecursive(ArrayList<Class<?>> classes)
    method encode (line 40) | public void encode(DataOutput outs) throws IOException
    method _encodeRecursive (line 46) | public void _encodeRecursive(DataOutput outs) throws IOException
    method vertex_t (line 52) | public vertex_t(byte[] data) throws IOException
    method vertex_t (line 57) | public vertex_t(DataInput ins) throws IOException
    method _decodeRecursiveFactory (line 65) | public static lcmtypes.vertex_t _decodeRecursiveFactory(DataInput ins)...
    method _decodeRecursive (line 72) | public void _decodeRecursive(DataInput ins) throws IOException
    method copy (line 78) | public lcmtypes.vertex_t copy()

FILE: data_generation/lcmtypes/lcmtypes/python/lcmtypes/edge_t.py
  class edge_t (line 16) | class edge_t(object):
    method __init__ (line 19) | def __init__(self):
    method encode (line 24) | def encode(self):
    method _encode_one (line 30) | def _encode_one(self, buf):
    method decode (line 38) | def decode(data):
    method _decode_one (line 48) | def _decode_one(buf):
    method _get_hash_recursive (line 57) | def _get_hash_recursive(parents):
    method _get_packed_fingerprint (line 66) | def _get_packed_fingerprint():

FILE: data_generation/lcmtypes/lcmtypes/python/lcmtypes/environment_t.py
  class environment_t (line 14) | class environment_t(object):
    method __init__ (line 17) | def __init__(self):
    method encode (line 23) | def encode(self):
    method _encode_one (line 29) | def _encode_one(self, buf):
    method decode (line 39) | def decode(data):
    method _decode_one (line 49) | def _decode_one(buf):
    method _get_hash_recursive (line 61) | def _get_hash_recursive(parents):
    method _get_packed_fingerprint (line 70) | def _get_packed_fingerprint():

FILE: data_generation/lcmtypes/lcmtypes/python/lcmtypes/graph_t.py
  class graph_t (line 16) | class graph_t(object):
    method __init__ (line 19) | def __init__(self):
    method encode (line 25) | def encode(self):
    method _encode_one (line 31) | def _encode_one(self, buf):
    method decode (line 41) | def decode(data):
    method _decode_one (line 51) | def _decode_one(buf):
    method _get_hash_recursive (line 65) | def _get_hash_recursive(parents):
    method _get_packed_fingerprint (line 74) | def _get_packed_fingerprint():

FILE: data_generation/lcmtypes/lcmtypes/python/lcmtypes/region_3d_t.py
  class region_3d_t (line 12) | class region_3d_t(object):
    method __init__ (line 15) | def __init__(self):
    method encode (line 19) | def encode(self):
    method _encode_one (line 25) | def _encode_one(self, buf):
    method decode (line 29) | def decode(data):
    method _decode_one (line 39) | def _decode_one(buf):
    method _get_hash_recursive (line 47) | def _get_hash_recursive(parents):
    method _get_packed_fingerprint (line 55) | def _get_packed_fingerprint():

FILE: data_generation/lcmtypes/lcmtypes/python/lcmtypes/state_t.py
  class state_t (line 12) | class state_t(object):
    method __init__ (line 15) | def __init__(self):
    method encode (line 20) | def encode(self):
    method _encode_one (line 26) | def _encode_one(self, buf):
    method decode (line 29) | def decode(data):
    method _decode_one (line 39) | def _decode_one(buf):
    method _get_hash_recursive (line 46) | def _get_hash_recursive(parents):
    method _get_packed_fingerprint (line 54) | def _get_packed_fingerprint():

FILE: data_generation/lcmtypes/lcmtypes/python/lcmtypes/trajectory_t.py
  class trajectory_t (line 14) | class trajectory_t(object):
    method __init__ (line 17) | def __init__(self):
    method encode (line 21) | def encode(self):
    method _encode_one (line 27) | def _encode_one(self, buf):
    method decode (line 33) | def decode(data):
    method _decode_one (line 43) | def _decode_one(buf):
    method _get_hash_recursive (line 53) | def _get_hash_recursive(parents):
    method _get_packed_fingerprint (line 62) | def _get_packed_fingerprint():

FILE: data_generation/lcmtypes/lcmtypes/python/lcmtypes/vertex_t.py
  class vertex_t (line 14) | class vertex_t(object):
    method __init__ (line 17) | def __init__(self):
    method encode (line 20) | def encode(self):
    method _encode_one (line 26) | def _encode_one(self, buf):
    method decode (line 30) | def decode(data):
    method _decode_one (line 40) | def _decode_one(buf):
    method _get_hash_recursive (line 47) | def _get_hash_recursive(parents):
    method _get_packed_fingerprint (line 56) | def _get_packed_fingerprint():

FILE: data_generation/permute.cpp
  function printCombination (line 13) | void printCombination(int arr[], int n, int r)
  function combinationUtil (line 65) | void combinationUtil(int arr[], int data[], int start, int end,
  function main (line 96) | int main()

FILE: data_generation/rrtstar/src/kdtree.c
  type kdhyperrect (line 51) | struct kdhyperrect {
  type kdnode (line 56) | struct kdnode {
  type res_node (line 64) | struct res_node {
  type kdtree (line 70) | struct kdtree {
  type kdres (line 77) | struct kdres {
  type kdnode (line 86) | struct kdnode
  type kdnode (line 87) | struct kdnode
  type res_node (line 88) | struct res_node
  type kdnode (line 88) | struct kdnode
  type kdres (line 89) | struct kdres
  type kdhyperrect (line 91) | struct kdhyperrect
  type kdhyperrect (line 92) | struct kdhyperrect
  type kdhyperrect (line 93) | struct kdhyperrect
  type kdhyperrect (line 93) | struct kdhyperrect
  type kdhyperrect (line 94) | struct kdhyperrect
  type kdhyperrect (line 95) | struct kdhyperrect
  type res_node (line 98) | struct res_node
  type res_node (line 99) | struct res_node
  type kdtree (line 107) | struct kdtree
  type kdtree (line 109) | struct kdtree
  function kd_free (line 123) | void kd_free(struct kdtree *tree)
  function clear_rec (line 131) | static void clear_rec(struct kdnode *node, void (*destr)(void*))
  function kd_clear (line 145) | void kd_clear(struct kdtree *tree)
  function kd_data_destructor (line 156) | void kd_data_destructor(struct kdtree *tree, void (*destr)(void*))
  function insert_rec (line 162) | static int insert_rec(struct kdnode **nptr, const double *pos, void *dat...
  function kd_insert (line 191) | int kd_insert(struct kdtree *tree, const double *pos, void *data)
  function kd_insertf (line 206) | int kd_insertf(struct kdtree *tree, const float *pos, void *data)
  function kd_insert3 (line 239) | int kd_insert3(struct kdtree *tree, double x, double y, double z, void *...
  function kd_insert3f (line 248) | int kd_insert3f(struct kdtree *tree, float x, float y, float z, void *data)
  function find_nearest (line 257) | static int find_nearest(struct kdnode *node, const double *pos, double r...
  function kd_nearest_i (line 290) | static void kd_nearest_i(struct kdnode *node, const double *pos, struct ...
  type kdres (line 351) | struct kdres
  type kdtree (line 351) | struct kdtree
  type kdhyperrect (line 353) | struct kdhyperrect
  type kdnode (line 354) | struct kdnode
  type kdres (line 355) | struct kdres
  type kdres (line 406) | struct kdres
  type kdtree (line 406) | struct kdtree
  type kdres (line 411) | struct kdres
  type kdres (line 440) | struct kdres
  type kdtree (line 440) | struct kdtree
  type kdres (line 449) | struct kdres
  type kdtree (line 449) | struct kdtree
  type kdres (line 458) | struct kdres
  type kdtree (line 458) | struct kdtree
  type kdres (line 461) | struct kdres
  type kdres (line 482) | struct kdres
  type kdtree (line 482) | struct kdtree
  type kdres (line 487) | struct kdres
  type kdres (line 516) | struct kdres
  type kdtree (line 516) | struct kdtree
  type kdres (line 525) | struct kdres
  type kdtree (line 525) | struct kdtree
  function kd_res_free (line 534) | void kd_res_free(struct kdres *rset)
  function kd_res_size (line 541) | int kd_res_size(struct kdres *set)
  function kd_res_rewind (line 546) | void kd_res_rewind(struct kdres *rset)
  function kd_res_end (line 551) | int kd_res_end(struct kdres *rset)
  function kd_res_next (line 556) | int kd_res_next(struct kdres *rset)
  type kdres (line 562) | struct kdres
  type kdres (line 573) | struct kdres
  type kdres (line 587) | struct kdres
  type kdres (line 597) | struct kdres
  type kdres (line 607) | struct kdres
  type kdhyperrect (line 613) | struct kdhyperrect
  type kdhyperrect (line 616) | struct kdhyperrect
  type kdhyperrect (line 618) | struct kdhyperrect
  function hyperrect_free (line 638) | static void hyperrect_free(struct kdhyperrect *rect)
  type kdhyperrect (line 645) | struct kdhyperrect
  type kdhyperrect (line 645) | struct kdhyperrect
  function hyperrect_extend (line 650) | static void hyperrect_extend(struct kdhyperrect *rect, const double *pos)
  function hyperrect_dist_sq (line 664) | static double hyperrect_dist_sq(struct kdhyperrect *rect, const double *...
  type res_node (line 684) | struct res_node
  type res_node (line 690) | struct res_node
  type res_node (line 692) | struct res_node
  function free_resnode (line 713) | static void free_resnode(struct res_node *node)
  function rlist_insert (line 730) | static int rlist_insert(struct res_node *list, struct kdnode *item, doub...
  function clear_results (line 750) | static void clear_results(struct kdres *rset)

FILE: data_generation/rrtstar/src/kdtree.h
  type kdtree (line 34) | struct kdtree
  type kdres (line 35) | struct kdres
  type kdtree (line 39) | struct kdtree
  type kdtree (line 42) | struct kdtree
  type kdtree (line 45) | struct kdtree
  type kdtree (line 51) | struct kdtree
  type kdtree (line 54) | struct kdtree
  type kdtree (line 55) | struct kdtree
  type kdtree (line 56) | struct kdtree
  type kdtree (line 57) | struct kdtree
  type kdres (line 63) | struct kdres
  type kdtree (line 63) | struct kdtree
  type kdres (line 64) | struct kdres
  type kdtree (line 64) | struct kdtree
  type kdres (line 65) | struct kdres
  type kdtree (line 65) | struct kdtree
  type kdres (line 66) | struct kdres
  type kdtree (line 66) | struct kdtree
  type kdres (line 76) | struct kdres
  type kdtree (line 76) | struct kdtree
  type kdres (line 77) | struct kdres
  type kdtree (line 77) | struct kdtree
  type kdres (line 78) | struct kdres
  type kdtree (line 78) | struct kdtree
  type kdres (line 79) | struct kdres
  type kdtree (line 79) | struct kdtree
  type kdres (line 82) | struct kdres
  type kdres (line 85) | struct kdres
  type kdres (line 88) | struct kdres
  type kdres (line 91) | struct kdres
  type kdres (line 96) | struct kdres
  type kdres (line 101) | struct kdres
  type kdres (line 102) | struct kdres
  type kdres (line 103) | struct kdres
  type kdres (line 104) | struct kdres
  type kdres (line 107) | struct kdres

FILE: data_generation/rrtstar/src/rrts.h
  function namespace (line 17) | namespace RRTstar {

FILE: data_generation/rrtstar/src/rrts.hpp
  function compareVertexCostPairs (line 373) | int compareVertexCostPairs (std::pair<RRTstar::Vertex<State,Trajectory,S...

FILE: data_generation/rrtstar/src/rrts_main.cpp
  class obst (line 31) | class obst
  function check (line 38) | bool check (double* first, double* second)
  function main (line 58) | int main () {
  function publishEnvironment (line 371) | int publishEnvironment (lcm_t *lcm, region& regionOperating, region& reg...
  function publishTraj (line 418) | int publishTraj (lcm_t *lcm, planner_t& planner, System& system, int num...
  function publishTree (line 515) | int publishTree (lcm_t *lcm, planner_t& planner, System& system) {

FILE: data_generation/rrtstar/src/system.h
  function class (line 20) | class State {
  function class (line 46) | class Trajectory {
  function class (line 87) | class System {

FILE: data_generation/rrtstar/src/system_single_integrator.cpp
  function State (line 80) | State& State::operator=(const State &stateIn){
  function Trajectory (line 138) | Trajectory& Trajectory::operator=(const Trajectory &trajectoryIn) {

FILE: data_generation/rrtstar/src/system_single_integrator.h
  function namespace (line 12) | namespace SingleIntegrator {

FILE: data_generation/viewer/src/main_viewer.cpp
  function main (line 27) | int main(int argc, char *argv[])

FILE: data_generation/viewer/src/renderers/graph_renderer.cpp
  class RendererGraph (line 14) | class RendererGraph {
  function graph_message_handler (line 30) | static void graph_message_handler (const lcm_recv_buf_t *rbuf, const cha...
  function environment_message_handler (line 43) | static void environment_message_handler (const lcm_recv_buf_t *rbuf, con...
  function trajectory_message_handler (line 55) | static void trajectory_message_handler (const lcm_recv_buf_t *rbuf, cons...
  function renderer_graph_draw (line 68) | static void renderer_graph_draw(BotViewer *viewer, BotRenderer *renderer)
  function renderer_graph_free (line 444) | static void renderer_graph_free (BotRenderer *renderer)
  function add_graph_renderer_to_viewer (line 454) | void add_graph_renderer_to_viewer (BotViewer* viewer, int render_priorit...

FILE: visualizer.py
  function main (line 8) | def main(args):
Condensed preview — 80 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (426K chars).
[
  {
    "path": "LICENSE",
    "chars": 1070,
    "preview": "MIT License\n\nCopyright (c) 2018 Ahmed Qureshi\n\nPermission is hereby granted, free of charge, to any person obtaining a c"
  },
  {
    "path": "MPNet/AE/CAE.py",
    "chars": 4255,
    "preview": "import argparse\nimport os\nimport torch\nimport torchvision\nfrom torch import nn\nfrom torch.autograd import Variable\nfrom "
  },
  {
    "path": "MPNet/AE/data_loader.py",
    "chars": 408,
    "preview": "import torch\nimport torch.utils.data as data\nimport os\nimport pickle\nimport numpy as np\nimport nltk\nfrom PIL import Imag"
  },
  {
    "path": "MPNet/data_loader.py",
    "chars": 4382,
    "preview": "import torch\nimport torch.utils.data as data\nimport os\nimport pickle\nimport numpy as np\nimport nltk\nfrom PIL import Imag"
  },
  {
    "path": "MPNet/model.py",
    "chars": 931,
    "preview": "import torch\nimport torch.nn as nn\nimport torchvision.models as models\nfrom torch.nn.utils.rnn import pack_padded_sequen"
  },
  {
    "path": "MPNet/neuralplanner.py",
    "chars": 9206,
    "preview": "import argparse\nimport torch\nimport torch.nn as nn\nimport numpy as np\nimport os\nimport pickle\nfrom data_loader import lo"
  },
  {
    "path": "MPNet/train.py",
    "chars": 3198,
    "preview": "import argparse\nimport torch\nimport torch.nn as nn\nimport numpy as np\nimport os\nimport pickle\nfrom data_loader import lo"
  },
  {
    "path": "README.md",
    "chars": 5067,
    "preview": "# Motion Planning Networks\nImplementation of [MPNet: Motion Planning Networks](https://sites.google.com/view/mpnet). [[a"
  },
  {
    "path": "data_generation/Makefile",
    "chars": 964,
    "preview": "default_target: all\n\n# get a list of subdirs to build by reading tobuild.txt\nSUBDIRS:=$(shell grep -v \"^\\#\" tobuild.txt)"
  },
  {
    "path": "data_generation/README",
    "chars": 797,
    "preview": "To install with libbot2:\n\n1. Check out libbot2 from \nhttps://github.com/libbot2/libbot2\n\n2. Make sure all dependencies o"
  },
  {
    "path": "data_generation/lcmtypes/CMakeLists.txt",
    "chars": 529,
    "preview": "SET(ENV{PKG_CONFIG_PATH} \"$ENV{PKG_CONFIG_PATH}:/usr/local/lib/pkgconfig:/opt/local/lib/pkgconfig:/usr/local/share/pkgco"
  },
  {
    "path": "data_generation/lcmtypes/Makefile",
    "chars": 1485,
    "preview": "# Default makefile distributed with pods version: 11.02.09\n\ndefault_target: all\n\n# Default to a less-verbose build.  If "
  },
  {
    "path": "data_generation/lcmtypes/cmake/lcmtypes.cmake",
    "chars": 15541,
    "preview": "# Macros for automatically compiling LCM types into C, Java, and Python\n# libraries.\n#\n# The primary macro is:\n#     lcm"
  },
  {
    "path": "data_generation/lcmtypes/cmake/pods.cmake",
    "chars": 12991,
    "preview": "# Macros to simplify compliance with the pods build policies.\n#\n# To enable the macros, add the following lines to CMake"
  },
  {
    "path": "data_generation/lcmtypes/lcmtypes/c/lcmtypes/lcmtypes.h",
    "chars": 298,
    "preview": "#ifndef __lcmtypes_lcmtypes_h__\n#define __lcmtypes_lcmtypes_h__\n\n#include \"lcmtypes_trajectory_t.h\"\n#include \"lcmtypes_s"
  },
  {
    "path": "data_generation/lcmtypes/lcmtypes/c/lcmtypes/lcmtypes_edge_t.c",
    "chars": 7953,
    "preview": "// THIS IS AN AUTOMATICALLY GENERATED FILE.  DO NOT MODIFY\n// BY HAND!!\n//\n// Generated by lcm-gen\n\n#include <string.h>\n"
  },
  {
    "path": "data_generation/lcmtypes/lcmtypes/c/lcmtypes/lcmtypes_edge_t.h",
    "chars": 5514,
    "preview": "// THIS IS AN AUTOMATICALLY GENERATED FILE.  DO NOT MODIFY\n// BY HAND!!\n//\n// Generated by lcm-gen\n\n#include <stdint.h>\n"
  },
  {
    "path": "data_generation/lcmtypes/lcmtypes/c/lcmtypes/lcmtypes_environment_t.c",
    "chars": 9486,
    "preview": "// THIS IS AN AUTOMATICALLY GENERATED FILE.  DO NOT MODIFY\n// BY HAND!!\n//\n// Generated by lcm-gen\n\n#include <string.h>\n"
  },
  {
    "path": "data_generation/lcmtypes/lcmtypes/c/lcmtypes/lcmtypes_environment_t.h",
    "chars": 5953,
    "preview": "// THIS IS AN AUTOMATICALLY GENERATED FILE.  DO NOT MODIFY\n// BY HAND!!\n//\n// Generated by lcm-gen\n\n#include <stdint.h>\n"
  },
  {
    "path": "data_generation/lcmtypes/lcmtypes/c/lcmtypes/lcmtypes_graph_t.c",
    "chars": 9230,
    "preview": "// THIS IS AN AUTOMATICALLY GENERATED FILE.  DO NOT MODIFY\n// BY HAND!!\n//\n// Generated by lcm-gen\n\n#include <string.h>\n"
  },
  {
    "path": "data_generation/lcmtypes/lcmtypes/c/lcmtypes/lcmtypes_graph_t.h",
    "chars": 5536,
    "preview": "// THIS IS AN AUTOMATICALLY GENERATED FILE.  DO NOT MODIFY\n// BY HAND!!\n//\n// Generated by lcm-gen\n\n#include <stdint.h>\n"
  },
  {
    "path": "data_generation/lcmtypes/lcmtypes/c/lcmtypes/lcmtypes_region_3d_t.c",
    "chars": 7403,
    "preview": "// THIS IS AN AUTOMATICALLY GENERATED FILE.  DO NOT MODIFY\n// BY HAND!!\n//\n// Generated by lcm-gen\n\n#include <string.h>\n"
  },
  {
    "path": "data_generation/lcmtypes/lcmtypes/c/lcmtypes/lcmtypes_region_3d_t.h",
    "chars": 5624,
    "preview": "// THIS IS AN AUTOMATICALLY GENERATED FILE.  DO NOT MODIFY\n// BY HAND!!\n//\n// Generated by lcm-gen\n\n#include <stdint.h>\n"
  },
  {
    "path": "data_generation/lcmtypes/lcmtypes/c/lcmtypes/lcmtypes_state_t.c",
    "chars": 7643,
    "preview": "// THIS IS AN AUTOMATICALLY GENERATED FILE.  DO NOT MODIFY\n// BY HAND!!\n//\n// Generated by lcm-gen\n\n#include <string.h>\n"
  },
  {
    "path": "data_generation/lcmtypes/lcmtypes/c/lcmtypes/lcmtypes_state_t.h",
    "chars": 5396,
    "preview": "// THIS IS AN AUTOMATICALLY GENERATED FILE.  DO NOT MODIFY\n// BY HAND!!\n//\n// Generated by lcm-gen\n\n#include <stdint.h>\n"
  },
  {
    "path": "data_generation/lcmtypes/lcmtypes/c/lcmtypes/lcmtypes_trajectory_t.c",
    "chars": 7973,
    "preview": "// THIS IS AN AUTOMATICALLY GENERATED FILE.  DO NOT MODIFY\n// BY HAND!!\n//\n// Generated by lcm-gen\n\n#include <string.h>\n"
  },
  {
    "path": "data_generation/lcmtypes/lcmtypes/c/lcmtypes/lcmtypes_trajectory_t.h",
    "chars": 5728,
    "preview": "// THIS IS AN AUTOMATICALLY GENERATED FILE.  DO NOT MODIFY\n// BY HAND!!\n//\n// Generated by lcm-gen\n\n#include <stdint.h>\n"
  },
  {
    "path": "data_generation/lcmtypes/lcmtypes/c/lcmtypes/lcmtypes_vertex_t.c",
    "chars": 6705,
    "preview": "// THIS IS AN AUTOMATICALLY GENERATED FILE.  DO NOT MODIFY\n// BY HAND!!\n//\n// Generated by lcm-gen\n\n#include <string.h>\n"
  },
  {
    "path": "data_generation/lcmtypes/lcmtypes/c/lcmtypes/lcmtypes_vertex_t.h",
    "chars": 5467,
    "preview": "// THIS IS AN AUTOMATICALLY GENERATED FILE.  DO NOT MODIFY\n// BY HAND!!\n//\n// Generated by lcm-gen\n\n#include <stdint.h>\n"
  },
  {
    "path": "data_generation/lcmtypes/lcmtypes/java/lcmtypes/edge_t.java",
    "chars": 2673,
    "preview": "/* LCM type definition class file\n * This file was automatically generated by lcm-gen\n * DO NOT MODIFY BY HAND!!!!\n */\n\n"
  },
  {
    "path": "data_generation/lcmtypes/lcmtypes/java/lcmtypes/environment_t.java",
    "chars": 3274,
    "preview": "/* LCM type definition class file\n * This file was automatically generated by lcm-gen\n * DO NOT MODIFY BY HAND!!!!\n */\n\n"
  },
  {
    "path": "data_generation/lcmtypes/lcmtypes/java/lcmtypes/graph_t.java",
    "chars": 3361,
    "preview": "/* LCM type definition class file\n * This file was automatically generated by lcm-gen\n * DO NOT MODIFY BY HAND!!!!\n */\n\n"
  },
  {
    "path": "data_generation/lcmtypes/lcmtypes/java/lcmtypes/region_3d_t.java",
    "chars": 2680,
    "preview": "/* LCM type definition class file\n * This file was automatically generated by lcm-gen\n * DO NOT MODIFY BY HAND!!!!\n */\n\n"
  },
  {
    "path": "data_generation/lcmtypes/lcmtypes/java/lcmtypes/state_t.java",
    "chars": 2208,
    "preview": "/* LCM type definition class file\n * This file was automatically generated by lcm-gen\n * DO NOT MODIFY BY HAND!!!!\n */\n\n"
  },
  {
    "path": "data_generation/lcmtypes/lcmtypes/java/lcmtypes/trajectory_t.java",
    "chars": 2650,
    "preview": "/* LCM type definition class file\n * This file was automatically generated by lcm-gen\n * DO NOT MODIFY BY HAND!!!!\n */\n\n"
  },
  {
    "path": "data_generation/lcmtypes/lcmtypes/java/lcmtypes/vertex_t.java",
    "chars": 2099,
    "preview": "/* LCM type definition class file\n * This file was automatically generated by lcm-gen\n * DO NOT MODIFY BY HAND!!!!\n */\n\n"
  },
  {
    "path": "data_generation/lcmtypes/lcmtypes/lcmtypes_edge_t.lcm",
    "chars": 119,
    "preview": "package lcmtypes;\n\nstruct edge_t {\n\n    vertex_t vertex_src;\n    vertex_t vertex_dst;\n    trajectory_t trajectory;\n}   "
  },
  {
    "path": "data_generation/lcmtypes/lcmtypes/lcmtypes_environment_t.lcm",
    "chars": 162,
    "preview": "package lcmtypes;\n\nstruct environment_t {\n    region_3d_t operating;\n    region_3d_t goal;\n\n    int32_t num_obstacles;\n "
  },
  {
    "path": "data_generation/lcmtypes/lcmtypes/lcmtypes_graph_t.lcm",
    "chars": 158,
    "preview": "package lcmtypes;\n\nstruct graph_t {\n    \n    int32_t num_vertices;\n    vertex_t vertices[num_vertices];\n\n    int32_t num"
  },
  {
    "path": "data_generation/lcmtypes/lcmtypes/lcmtypes_region_3d_t.lcm",
    "chars": 83,
    "preview": "package lcmtypes;\n\nstruct region_3d_t {\n    double center[3];\n    double size[3];\n}"
  },
  {
    "path": "data_generation/lcmtypes/lcmtypes/lcmtypes_state_t.lcm",
    "chars": 80,
    "preview": "package lcmtypes;\n\nstruct state_t {\n\n    double x;\n    double y;\n    double z;\n}"
  },
  {
    "path": "data_generation/lcmtypes/lcmtypes/lcmtypes_trajectory_t.lcm",
    "chars": 103,
    "preview": "package lcmtypes;\n\nstruct trajectory_t {\n    \n    int32_t num_states;\n    state_t states[num_states];\n}"
  },
  {
    "path": "data_generation/lcmtypes/lcmtypes/lcmtypes_vertex_t.lcm",
    "chars": 62,
    "preview": "package lcmtypes;\n\nstruct vertex_t {\n    \n    state_t state;\n}"
  },
  {
    "path": "data_generation/lcmtypes/lcmtypes/python/lcmtypes/__init__.py",
    "chars": 342,
    "preview": "\"\"\"LCM package __init__.py file\nThis file automatically generated by lcm-gen.\nDO NOT MODIFY BY HAND!!!!\n\"\"\"\n\nfrom .envir"
  },
  {
    "path": "data_generation/lcmtypes/lcmtypes/python/lcmtypes/edge_t.py",
    "chars": 2590,
    "preview": "\"\"\"LCM type definitions\nThis file automatically generated by lcm.\nDO NOT MODIFY BY HAND!!!!\n\"\"\"\n\ntry:\n    import cString"
  },
  {
    "path": "data_generation/lcmtypes/lcmtypes/python/lcmtypes/environment_t.py",
    "chars": 2914,
    "preview": "\"\"\"LCM type definitions\nThis file automatically generated by lcm.\nDO NOT MODIFY BY HAND!!!!\n\"\"\"\n\ntry:\n    import cString"
  },
  {
    "path": "data_generation/lcmtypes/lcmtypes/python/lcmtypes/graph_t.py",
    "chars": 2780,
    "preview": "\"\"\"LCM type definitions\nThis file automatically generated by lcm.\nDO NOT MODIFY BY HAND!!!!\n\"\"\"\n\ntry:\n    import cString"
  },
  {
    "path": "data_generation/lcmtypes/lcmtypes/python/lcmtypes/region_3d_t.py",
    "chars": 1917,
    "preview": "\"\"\"LCM type definitions\nThis file automatically generated by lcm.\nDO NOT MODIFY BY HAND!!!!\n\"\"\"\n\ntry:\n    import cString"
  },
  {
    "path": "data_generation/lcmtypes/lcmtypes/python/lcmtypes/state_t.py",
    "chars": 1747,
    "preview": "\"\"\"LCM type definitions\nThis file automatically generated by lcm.\nDO NOT MODIFY BY HAND!!!!\n\"\"\"\n\ntry:\n    import cString"
  },
  {
    "path": "data_generation/lcmtypes/lcmtypes/python/lcmtypes/trajectory_t.py",
    "chars": 2228,
    "preview": "\"\"\"LCM type definitions\nThis file automatically generated by lcm.\nDO NOT MODIFY BY HAND!!!!\n\"\"\"\n\ntry:\n    import cString"
  },
  {
    "path": "data_generation/lcmtypes/lcmtypes/python/lcmtypes/vertex_t.py",
    "chars": 1902,
    "preview": "\"\"\"LCM type definitions\nThis file automatically generated by lcm.\nDO NOT MODIFY BY HAND!!!!\n\"\"\"\n\ntry:\n    import cString"
  },
  {
    "path": "data_generation/lcmtypes/pod.xml",
    "chars": 193,
    "preview": "<pod>\n    <name>racecar_lcmtypes</name>\n\n    <maintainers>\n    </maintainers>\n\n    <summary>\n    </summary>\n\n    <descri"
  },
  {
    "path": "data_generation/permute.cpp",
    "chars": 2491,
    "preview": "// To generate obstacles permutation to generate new environments\n#include <iostream>\n#include <stdio.h>\n#include <fstre"
  },
  {
    "path": "data_generation/rrtstar/CMakeLists.txt",
    "chars": 290,
    "preview": "cmake_minimum_required(VERSION 2.6.0)\n\n# pull in the pods macros. See cmake/pods.cmake for documentation\nset(POD_NAME rr"
  },
  {
    "path": "data_generation/rrtstar/Makefile",
    "chars": 1487,
    "preview": "# Default makefile distributed with pods version: 10.11.18\n\ndefault_target: all\n\n# Default to a less-verbose build.  If "
  },
  {
    "path": "data_generation/rrtstar/cmake/pods.cmake",
    "chars": 13014,
    "preview": "# Macros to simplify compliance with the pods build policies.\n#\n# To enable the macros, add the following lines to CMake"
  },
  {
    "path": "data_generation/rrtstar/doxy/doxy.conf",
    "chars": 69286,
    "preview": "# Doxyfile 1.7.2\n\n# This file describes the settings to be used by the documentation system\n# doxygen (www.doxygen.org) "
  },
  {
    "path": "data_generation/rrtstar/src/CMakeLists.txt",
    "chars": 500,
    "preview": "SET(ENV{PKG_CONFIG_PATH} \"$ENV{PKG_CONFIG_PATH}:/usr/local/lib/pkgconfig:/opt/local/lib/pkgconfig:/usr/local/share/pkgco"
  },
  {
    "path": "data_generation/rrtstar/src/CMakeLists.txt~",
    "chars": 461,
    "preview": "SET(ENV{PKG_CONFIG_PATH} \"$ENV{PKG_CONFIG_PATH}:/usr/local/lib/pkgconfig:/opt/local/lib/pkgconfig:/usr/local/share/pkgco"
  },
  {
    "path": "data_generation/rrtstar/src/kdtree.c",
    "chars": 16452,
    "preview": "/*\nThis file is part of ``kdtree'', a library for working with kd-trees.\nCopyright (C) 2007-2009 John Tsiombikas <nuclea"
  },
  {
    "path": "data_generation/rrtstar/src/kdtree.h",
    "chars": 4677,
    "preview": "/*\nThis file is part of ``kdtree'', a library for working with kd-trees.\nCopyright (C) 2007-2009 John Tsiombikas <nuclea"
  },
  {
    "path": "data_generation/rrtstar/src/rrts.h",
    "chars": 6147,
    "preview": "/*! \n * \\file rrts.h \n */ \n\n#ifndef __RRTS_H_\n#define __RRTS_H_\n\n\n#include \"kdtree.h\"\n\n#include <list>\n#include <set>\n#i"
  },
  {
    "path": "data_generation/rrtstar/src/rrts.hpp",
    "chars": 17836,
    "preview": "/*! \n * \\file rrts.hpp \n */ \n\n#ifndef __RRTS_HPP_\n#define __RRTS_HPP_\n\n#include <iostream>\n#include <cfloat>\n#include <c"
  },
  {
    "path": "data_generation/rrtstar/src/rrts_main.cpp",
    "chars": 19062,
    "preview": "#define LIBBOT_PRESENT 0\n\n#include <iostream>\n#include <fstream>\n#include <ctime>\n\n#include <bot_core/bot_core.h>\n\n#incl"
  },
  {
    "path": "data_generation/rrtstar/src/system.h",
    "chars": 4606,
    "preview": "/*! \n * \\file system.h \n *\n * This serves as a template to start a new system file. \n * It should not be included as is."
  },
  {
    "path": "data_generation/rrtstar/src/system_single_integrator.cpp",
    "chars": 9510,
    "preview": "#include \"system_single_integrator.h\"\n#include <cmath>\n#include <cstdlib>\n\n#include <iostream>\n\nusing namespace std;\nusi"
  },
  {
    "path": "data_generation/rrtstar/src/system_single_integrator.h",
    "chars": 8733,
    "preview": "/*! \n * \\file system_single_integrator.h \n */ \n\n#ifndef __RRTS_SYSTEM_SINGLE_INTEGRATOR_H_\n#define __RRTS_SYSTEM_SINGLE_"
  },
  {
    "path": "data_generation/tobuild.txt",
    "chars": 130,
    "preview": "# list of collections to build, one one each line.  Empty lines\n# and lines starting with '#' are ignored\nlcmtypes\nviewe"
  },
  {
    "path": "data_generation/viewer/CMakeLists.txt",
    "chars": 546,
    "preview": "cmake_minimum_required(VERSION 2.6.0)\n\n# pull in the pods macros. See cmake/pods.cmake for documentation\nset(POD_NAME vi"
  },
  {
    "path": "data_generation/viewer/Makefile",
    "chars": 1594,
    "preview": "# Default makefile distributed with pods version: 11.03.11\n\ndefault_target: all\n\n# Default to a less-verbose build.  If "
  },
  {
    "path": "data_generation/viewer/README",
    "chars": 440,
    "preview": "This is a default README file, please replace its contents with information\nrelevant to your project.\n\nThis software is "
  },
  {
    "path": "data_generation/viewer/cmake/pods.cmake",
    "chars": 13069,
    "preview": "# Macros to simplify compliance with the pods build policies.\n#\n# To enable the macros, add the following lines to CMake"
  },
  {
    "path": "data_generation/viewer/src/CMakeLists.txt",
    "chars": 727,
    "preview": "SET(ENV{PKG_CONFIG_PATH} \"$ENV{PKG_CONFIG_PATH}:/usr/local/lib/pkgconfig:/opt/local/lib/pkgconfig:/usr/local/share/pkgco"
  },
  {
    "path": "data_generation/viewer/src/main_viewer.cpp",
    "chars": 1031,
    "preview": "#include <iostream>\n#include <ctime>\n\n//#include <gtk/gtk.h>\n\n#include <bot_core/bot_core.h>\n#include <bot_vis/bot_vis.h"
  },
  {
    "path": "data_generation/viewer/src/renderers/CMakeLists.txt",
    "chars": 739,
    "preview": "SET(ENV{PKG_CONFIG_PATH} \"$ENV{PKG_CONFIG_PATH}:/usr/local/lib/pkgconfig:/opt/local/lib/pkgconfig:/usr/local/share/pkgco"
  },
  {
    "path": "data_generation/viewer/src/renderers/graph_renderer.cpp",
    "chars": 14365,
    "preview": "#include \"graph_renderer.h\"\n\n#include <lcmtypes/lcmtypes.h>\n\n#include <vector>\n#include <cmath>\n#include <sstream>\n#incl"
  },
  {
    "path": "data_generation/viewer/src/renderers/graph_renderer.h",
    "chars": 464,
    "preview": "#ifndef RACECAR_ROAD_RENDERER_H_\n#define RACECAR_ROAD_RENDERER_H_\n\n#include <iostream>\n\n#include <bot_vis/bot_vis.h>\n#in"
  },
  {
    "path": "data_generation/viewer/src/renderers/graph_renderer.h~",
    "chars": 466,
    "preview": "#ifndef RACECAR_ROAD_RENDERER_H_\n#define RACECAR_ROAD_RENDERER_H_\n\n#include <iostream>\n\n#include <bot_vis/bot_vis.h>\n#in"
  },
  {
    "path": "readme",
    "chars": 458,
    "preview": "\ndata_generation\n-Contains C++ code to generate expert demonstrations in 2D and 3D environments\n- Follow the instruction"
  },
  {
    "path": "visualizer.py",
    "chars": 974,
    "preview": "import matplotlib\n#matplotlib.use('Agg')\nimport matplotlib.pyplot as plt\nimport struct\nimport numpy as np\nimport argpars"
  }
]

About this extraction

This page contains the full source code of the ahq1993/MPNet GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 80 files (393.2 KB), approximately 107.5k tokens, and a symbol index with 450 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!