ROS kinetic URDF机器人建模

创建一个功能包
kinetic@vm:~$ cd catkin_ws/src/
kinetic@vm:~/catkin_ws/src$ ls
CMakeLists.txt 

kinetic@vm:~/catkin_ws/src$ catkin_create_pkg mbot_description urdf xacro
Created file mbot_description/package.xml
Created file mbot_description/CMakeLists.txt
Successfully created files in /home/kinetic/catkin_ws/src/mbot_description. Please adjust the values in package.xml.
kinetic@vm:~/catkin_ws/src$ ls
CMakeLists.txt   mbot_description

kinetic@vm:~/catkin_ws/src$ cd mbot_description/
kinetic@vm:~/catkin_ws/src/mbot_description$ ls
CMakeLists.txt  package.xml
kinetic@vm:~/catkin_ws/src/mbot_description$ mkdir urdf meshes launch config
kinetic@vm:~/catkin_ws/src/mbot_description$ ls
CMakeLists.txt  config  launch  meshes  package.xml  urdf

urdf         存放机器人模型的URDF或xacro文件
meshes         放置URDF中引用的模型渲染文件
launch         保存相关启动文件
config         保存rviz的配置文件

kinetic@vm:~/catkin_ws/src/mbot_description/launch$ cat display_mbot_base_urdf.launch 


	

	
	

	
	

	
	

	
	

param    加载ros参数, 参数名为 robot_description,textfile是参数的信息,robot_description中保存了一条路径信息。

joint_state_publisher
        
发布每个joint(除fixed类型)的状态,而且可以通过UI界面对joint进行控制

robot_state_publisher

将机器人各个links、joints之间的关系,通过TF的形式,整理三维姿态信息发布

创建机器人模型
kinetic@vm:~/catkin_ws/src/mbot_description/launch$ cat display_mbot_base_urdf.launch


	

	
	

	
	

	
	

	
	

kinetic@vm:~/catkin_ws/src/mbot_description/urdf$ cat mbot_base.urdf

	
	

    		
        	
             
            	
                	
            
            	
                	
            
        
    

    	
        
        
        
        	
    

    	
        
            
            
                
            
            
                
            
        
    

    
        
        
        
        
    

    
        
            
            
                
            
            
                
            
        
    

    
        
        
        
        
    

    	
        
            
            
                
            
            
                
            
        
    

    
        
        
        
        
    

    
        
            
            
                
            
            
                
            
        
    

运行
        kinetic@vm:~$ roslaunch mbot_description display_mbot_base_urdf.launch

检查URDF模型整体结构
kinetic@vm:~/catkin_ws/src/mbot_description/urdf$ urdf_to_graphiz mbot_base.urdf
Created file mbot.gv
Created file mbot.pdf

参考
HRMRP机器人的设计:    http://www.guyuehome.com/275
创建简单的机器人模型smartcar:    http://www.guyuehome.com/234
ROS URDF Tutorials:      http://wiki.ros.org/urdf/Tutorials
ARM端安装ROS:    http://wiki.ros.org/indigo/Installation/UbuntuARM

你可能感兴趣的:(ROS)