| 
									
										
										
										
											2012-06-05 08:02:55 +08:00
										 |  |  | function plot3DTrajectory(values,style,frames,scale)
 | 
					
						
							| 
									
										
										
										
											2012-06-04 13:53:51 +08:00
										 |  |  | % plot3DTrajectory | 
					
						
							|  |  |  | if nargin<3,frames=false;end | 
					
						
							| 
									
										
										
										
											2012-06-05 08:02:55 +08:00
										 |  |  | if nargin<4,scale=0;end | 
					
						
							| 
									
										
										
										
											2012-06-04 13:53:51 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | plot3(values.xs(),values.ys(),values.zs(),style); hold on | 
					
						
							|  |  |  | if frames | 
					
						
							| 
									
										
										
										
											2012-06-05 08:02:55 +08:00
										 |  |  |     N=values.size; | 
					
						
							| 
									
										
										
										
											2012-06-04 13:53:51 +08:00
										 |  |  |     for i=0:N-1 | 
					
						
							|  |  |  |         pose = values.pose(i); | 
					
						
							|  |  |  |         t = pose.translation; | 
					
						
							|  |  |  |         R = pose.rotation.matrix; | 
					
						
							| 
									
										
										
										
											2012-06-05 08:02:55 +08:00
										 |  |  |         quiver3(t.x,t.y,t.z,R(1,1),R(2,1),R(3,1),scale,'r'); | 
					
						
							|  |  |  |         quiver3(t.x,t.y,t.z,R(1,2),R(2,2),R(3,2),scale,'g'); | 
					
						
							|  |  |  |         quiver3(t.x,t.y,t.z,R(1,3),R(2,3),R(3,3),scale,'b'); | 
					
						
							| 
									
										
										
										
											2012-06-04 13:53:51 +08:00
										 |  |  |     end | 
					
						
							|  |  |  | end |