-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodel.xacro
More file actions
102 lines (95 loc) · 2.76 KB
/
Copy pathmodel.xacro
File metadata and controls
102 lines (95 loc) · 2.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<?xml version="1.0"?>
<sdf version="1.9" xmlns:xacro="http://www.ros.org/wiki/xacro">
<model name="rgbd_cameras">
<static>true</static>
<link name="rgbd_cameras_link">
<pose>0 0 0 0 0 0</pose>
<kinematic>true</kinematic>
<gravity>false</gravity>
<inertial>
<mass>0.0</mass>
<inertia>
<ixx>0.0</ixx>
<ixy>0.0</ixy>
<iyy>0.0</iyy>
<iyz>0.0</iyz>
<izz>0.0</izz>
</inertia>
</inertial>
</link>
<!-- Macro Definition for Depth Camera -->
<xacro:macro name="rgbd_camera_sensor"
params="name pose horizontal_fov image_width image_height update_rate">
<link name="${name}_link">
<pose>${pose}</pose>
<kinematic>true</kinematic>
<gravity>false</gravity>
<inertial>
<mass>0.0</mass>
<inertia>
<ixx>0.0</ixx>
<ixy>0.0</ixy>
<iyy>0.0</iyy>
<iyz>0.0</iyz>
<izz>0.0</izz>
</inertia>
</inertial>
<visual name="visual">
<geometry>
<box>
<size>0.05 0.05 0.05</size>
</box>
</geometry>
<material>
<ambient>0 0 1 1</ambient>
<diffuse>0 0 1 1</diffuse>
</material>
</visual>
<visual name="landmark">
<geometry>
<cylinder>
<radius>0.01</radius>
<length>0.005</length>
</cylinder>
</geometry>
<pose>0.03 0 0 0 1.5708 0</pose>
<material>
<ambient>1 0 0 1</ambient>
<diffuse>1 0 0 1</diffuse>
</material>
</visual>
<sensor name="${name}" type="rgbd_camera">
<gz_frame_id>${name}_link</gz_frame_id>
<pose>0 0 0 0 0 0</pose>
<camera>
<horizontal_fov>${horizontal_fov}</horizontal_fov>
<image>
<width>${image_width}</width>
<height>${image_height}</height>
<format>R8G8B8</format>
</image>
<clip>
<near>0.1</near>
<far>100.0</far>
</clip>
</camera>
<update_rate>${update_rate}</update_rate>
<visualize>false</visualize>
</sensor>
</link>
<joint name="${name}_joint" type="fixed">
<parent>rgbd_cameras_link</parent>
<child>${name}_link</child>
<preserve_fixed_joint>true</preserve_fixed_joint>
</joint>
</xacro:macro>
<!-- Add Camera Sensors -->
<!-- <xacro:rgbd_camera_sensor
name="zed_camera"
pose="0.12 -0.02 0.0 0 0 0"
horizontal_fov="1.91986"
image_width="1920"
image_height="1080"
update_rate="30" /> -->
</model>
</sdf>