2012-06-05 13:15:26 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								function plotCamera(pose, axisLength)
							 | 
						
					
						
							
								
									
										
										
										
											2015-01-23 00:24:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									hold on
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2020-08-18 02:37:12 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    C = pose.translation();
							 | 
						
					
						
							
								
									
										
										
										
											2012-06-05 13:15:26 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    R = pose.rotation().matrix();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    xAxis = C+R(:,1)*axisLength;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    L = [C xAxis]';
							 | 
						
					
						
							
								
									
										
										
										
											2015-01-22 13:25:06 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    h_x = line(L(:,1),L(:,2),L(:,3),'Color','r');
							 | 
						
					
						
							
								
									
										
										
										
											2012-06-05 13:15:26 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    yAxis = C+R(:,2)*axisLength;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    L = [C yAxis]';
							 | 
						
					
						
							
								
									
										
										
										
											2015-01-22 13:25:06 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    h_y = line(L(:,1),L(:,2),L(:,3),'Color','g');
							 | 
						
					
						
							
								
									
										
										
										
											2012-06-05 13:15:26 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    zAxis = C+R(:,3)*axisLength;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    L = [C zAxis]';
							 | 
						
					
						
							
								
									
										
										
										
											2015-01-22 13:25:06 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    h_z = line(L(:,1),L(:,2),L(:,3),'Color','b');
							 | 
						
					
						
							
								
									
										
										
										
											2012-06-05 13:15:26 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    axis equal
							 | 
						
					
						
							
								
									
										
										
										
											2015-01-22 13:25:06 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								end
							 |