URDF

11 篇文章 0 订阅
4 篇文章 0 订阅

Solidworks模型转化为URDF文件格式+三连杆机械臂示例+逆运动学

https://blog.csdn.net/gpeng832/article/details/73917487

 

关于SolidWorks导出URDF模型的总结

https://blog.csdn.net/mt_lixinzeng/article/details/80268572

 

 

Rviz:  RobotModel --Status: Error :如果关节是活动的比如: revolute , continuous 就要为他们编写相应的驱动程序并发布joint_status状态.否则rviz加载robot model之后status会显示错误状态,并且活动的关节也会显示错误.

检查urdf文件语法:check_urdf smartcar.urdf

在indigo版本的ROS中,执行如下命令即可: rosrun urdfdom check_urdf /tmp/pr2.urdf

可视化模型 , gui = true 可以让关节动起来:  roslaunch urdf_tutorial display.launch model:=path/to/your/xxx.urdf gui:=true

图形化显示URDF模型 :urdf_to_graphiz my_robot.urdf

origin:xyz以parent link为原点,child link的三维坐标系位置。

origin:rpy child link绕z轴旋转的滚动角(roll),绕y轴方向旋转的俯仰(pitch)角,和绕x轴旋转的偏转(yaw)角.

 

Things to note:

  • The fixed frame is transform frame where the center of the grid is located. Here, it’s a frame defined by our one link, base_link.
  • The visual element (the cylinder) has its origin at the center of its geometry as a default. Hence, half the cylinder is below the grid.

右手坐标系法则:

<box size="0.6 0.1 0.2"/> 分别对应xyz三个方向的值; 相对于原点<origin>,如果没有赋值的话就是几何形状<geometry>的中心点。 为了方便确定map中的右手坐标系,可以在rviz中勾选 show Axes来显示xyz坐标轴。
关于原点<origin>
Both of the shapes overlap with each other, because they share the same origin. If we want them not to overlap we must define more origins.

<joint> 和<link>中 <origin>元素的意义:

 

  • Let’s start by examining the joint’s origin. It is defined in terms of theparent’s reference frame.So we are -0.22 meters in the y direction (to our left, but to the right relative to the axes) and 0.25 meters in the z direction (up). This means that the origin for the child link will be up and to the right, regardless of the child link’s visual origin tag. Since we didn’t specify a rpy (roll pitch yaw) attribute, the child frame will be default have the same orientation as the parent frame.This is the transform from the parent link to the child link. The joint is located at the origin of the child link
  • Now, looking at the leg’s visual origin, it has both a xyz and rpy offset. This defines where thecenter of the visual element should be, relative to its origin. Since we want the leg to attach at the top, we offset the origin down by setting the z offset to be -0.3 meters. And since we want the long part of the leg to be parallel to the z axis, we rotate the visual part PI/2 around the Y axis.

<joint type ="continuous">  <axis>    

<joint name="head_swivel" type="continuous">
  <parent link="base_link"/>
     <child link="head"/>
     <axis xyz="0 0 1"/>
     <origin xyz="0 0 0.3"/>
</joint>

The connection between the body and the head is a continuous joint, meaning that it can take on any angle from negative infinity to positive infinity. The wheels are also modeled like this, so that they can roll in both directions forever.

The only additional information we have to add is the axis of rotation,here specified by an xyz triplet, which specifies a vector around which the head will rotate. Since we want it to go around the z axis, we specify the vector "0 0 1".

<joint type = "revolute">

    revolute joints. This means that they rotate inthe same way that the continuous joints do, but they have strict limits.

<joint type="prismatic">

This means thatit moves along an axis, not around it. This translational movement is what allows our robot model to extend and retractits gripper arm

Whereas the prismatic joint can only move along one dimension, a planar joint can move around in a plane, or two dimensions. Furthermore, a floating joint is unconstrained, and can move around in any of the three dimensions

 

Xacro 

The value of the contents of the ${} construct are then used to replace the ${}. This means you can combine it with other text in the attribute.

<xacro:property name=”robotname” value=”marvin” />
<link name=”${robotname}s_leg” />

This will generate

<linkname=”marvins_leg”/>

the contents in the ${} don’t have to only be a property . You can build up arbitrarily complex expressions in the ${} construct using the four basic operations (+,-,*,/), the unary minus, and parenthesis . In Jade and later distros, you can use more than the basic operations listed above, notably sin and cos

 

 joint_state_publisher从ROS参数服务器中读取robot_description参数, 找到所有non-fixed joint, 发布他们的JointState消息到/joint_states话题.

robot_state_publisher从/joint_states话题中获取机器人joint角度作为输入, 使用机器人的运动学树模型计算出机器人link的3D姿态, 然后将其发布到话题/tf和 /tf_static.

 

在rviz中查看各关节的ff关系

roslaunch urdf_tutorial display.launch model:=llb.urdf gui:=true

 

Problem converting simple urdf file in collada

https://answers.ros.org/question/198995/problem-converting-simple-urdf-file-in-collada/

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值