Skip to content

Commit 9f8bbb6

Browse files
author
Alejandro Arnal
committed
Adds first version of link 750
1 parent d5b2eab commit 9f8bbb6

File tree

5 files changed

+201
-0
lines changed

5 files changed

+201
-0
lines changed

meshes/link_750_base.stl

3.25 MB
Binary file not shown.

meshes/link_750_pan.stl

70.9 KB
Binary file not shown.

meshes/link_750_tilt.stl

1.1 MB
Binary file not shown.

urdf/all_sensors.urdf.xacro

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,4 +190,7 @@
190190

191191
<!-- Teltonika antenna combo-->
192192
<xacro:include filename="$(find robotnik_sensors)/urdf/teltonika_antenna_combo.urdf.xacro" />
193+
194+
<!-- Link 750 -->
195+
<xacro:include filename="$(find robotnik_sensors)/urdf/link_750_nh.urdf.xacro" />
193196
</robot>

urdf/link_750_nh.urdf.xacro

Lines changed: 198 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,198 @@
1+
<?xml version="1.0"?>
2+
<robot xmlns:xacro="http://wiki.ros.org/xacro" name="sensor_link_750_nh">
3+
<xacro:property name="ptz_joint_effort_limit" value="1.0"/>
4+
<xacro:property name="ptz_joint_velocity_limit" value="1.0"/>
5+
<xacro:property name="ptz_joint_friction" value="0.1"/>
6+
<xacro:property name="ptz_joint_damping" value="0.1"/>
7+
<xacro:property name="ptz_mechanical_reduction" value="1.0"/>
8+
<xacro:property name="PI" value="3.14159265359"/>
9+
10+
<xacro:macro name="sensor_link_750_nh" params="prefix parent *origin far:=^|8.0 near:=^|0.05 prefix_topic:=^ptz_camera">
11+
12+
<joint name="${prefix}_joint" type="fixed">
13+
<axis xyz="0 1 0"/>
14+
<xacro:insert_block name="origin"/>
15+
<parent link="${parent}"/>
16+
<child link="${prefix}_base_link"/>
17+
</joint>
18+
<link name="${prefix}_base_link">
19+
<inertial>
20+
<origin xyz="0.066 0 0" rpy="0 0 0"/>
21+
<mass value="0.8"/>
22+
<xacro:solid_cuboid_inertia m="0.8" w="0.165" h="0.165" d="0.132" />
23+
</inertial>
24+
<visual>
25+
<origin xyz="0 0 0" rpy="0 0 0"/>
26+
<material name="grey_color">
27+
<color rgba="0.1 0.1 0.1 1"/>
28+
</material>
29+
<geometry>
30+
<mesh filename="package://robotnik_sensors/meshes/link_750_base.stl" scale="1.0 1.0 1.0"/>
31+
</geometry>
32+
</visual>
33+
<collision>
34+
<origin xyz="0.0 0.0 0" rpy="0 0 0"/>
35+
<geometry>
36+
<mesh filename="package://robotnik_sensors/meshes/link_750_base.stl" scale="1.0 1.0 1.0"/>
37+
</geometry>
38+
</collision>
39+
</link>
40+
41+
<joint name="${prefix}_pan_joint" type="revolute">
42+
<axis xyz="1 0 0"/>
43+
<origin xyz="0.0 0.0 0.0318" rpy="0 0 0"/>
44+
<!-- check the displacement -->
45+
<parent link="${prefix}_base_link"/>
46+
<child link="${prefix}_pan_link"/>
47+
<limit effort="${ptz_joint_effort_limit}" velocity="${ptz_joint_velocity_limit}" lower="-3.1416" upper="3.1416"/>
48+
<joint_properties damping="${ptz_joint_damping}" friction="{ptz_joint_friction}"/>
49+
</joint>
50+
<link name="${prefix}_pan_link">
51+
<inertial>
52+
<mass value="0.1"/>
53+
<origin xyz="0 0 0" rpy="0 0 0"/>
54+
<xacro:solid_cuboid_inertia m="0.1" w="0.1" h="0.11" d="0.11" />
55+
</inertial>
56+
<visual>
57+
<origin xyz="0 0 0" rpy="0 0 0"/>
58+
<material name="grey_color">
59+
<color rgba="0.1 0.1 0.1 1"/>
60+
</material>
61+
<geometry>
62+
<mesh filename="package://robotnik_sensors/meshes/link_750_pan.stl" scale="1.0 1.0 1.0"/>
63+
</geometry>
64+
</visual>
65+
<collision>
66+
<origin xyz="0.0 0.0 0" rpy="0 0 0"/>
67+
<geometry>
68+
<mesh filename="package://robotnik_sensors/meshes/link_750_pan.stl" scale="1.0 1.0 1.0"/>
69+
</geometry>
70+
</collision>
71+
</link>
72+
<transmission name="${prefix}_pan_trans">
73+
<type>transmission_interface/SimpleTransmission</type>
74+
<joint name="${prefix}_pan_joint">
75+
<hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>
76+
</joint>
77+
<actuator name="${prefix}pan_motor">
78+
<hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>
79+
<mechanicalReduction>${ptz_mechanical_reduction}</mechanicalReduction>
80+
</actuator>
81+
</transmission>
82+
83+
<joint name="${prefix}_tilt_joint" type="revolute">
84+
<axis xyz="0 1 0"/>
85+
<origin xyz="0.0 0.0 0.102" rpy="0 0 0"/>
86+
<parent link="${prefix}_pan_link"/>
87+
<child link="${prefix}_tilt_link"/>
88+
<limit effort="${ptz_joint_effort_limit}" velocity="${ptz_joint_velocity_limit}" lower="-1.5708" upper="1.5708"/>
89+
<joint_properties damping="${ptz_joint_damping}" friction="{ptz_joint_friction}"/>
90+
</joint>
91+
<link name="${prefix}_tilt_link">
92+
<inertial>
93+
<mass value="0.1"/>
94+
<origin xyz="0 0 0" rpy="0 0 0"/>
95+
<xacro:solid_cuboid_inertia m="0.1" w="0.11" h="0.11" d="0.1" />
96+
</inertial>
97+
<visual>
98+
<origin xyz="0 0 0" rpy="0 0 0"/>
99+
<material name="grey_color">
100+
<color rgba="0.1 0.1 0.1 1"/>
101+
</material>
102+
<geometry>
103+
<mesh filename="package://robotnik_sensors/meshes/link_750_tilt.stl" scale="1.0 1.0 1.0"/>
104+
</geometry>
105+
</visual>
106+
<collision>
107+
<origin xyz="0.0 0.0 0" rpy="0 0 0"/>
108+
<geometry>
109+
<mesh filename="package://robotnik_sensors/meshes/link_750_tilt.stl" scale="1.0 1.0 1.0"/>
110+
</geometry>
111+
</collision>
112+
</link>
113+
<transmission name="${prefix}_tilt_trans">
114+
<type>transmission_interface/SimpleTransmission</type>
115+
<joint name="${prefix}_tilt_joint">
116+
<hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>
117+
</joint>
118+
<actuator name="${prefix}tilt_motor">
119+
<hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>
120+
<mechanicalReduction>${ptz_mechanical_reduction}</mechanicalReduction>
121+
</actuator>
122+
</transmission>
123+
124+
<joint name="${prefix}_frame_joint" type="fixed">
125+
<origin xyz="0 0 0" rpy="0 0 0"/>
126+
<parent link="${prefix}_tilt_link"/>
127+
<child link="${prefix}_frame_link"/>
128+
</joint>
129+
<link name="${prefix}_frame_link">
130+
<inertial>
131+
<mass value="0.1"/>
132+
<origin xyz="0 0 0"/>
133+
<xacro:solid_cuboid_inertia m="0.1" w="0.11" h="0.11" d="0.1" />
134+
</inertial>
135+
</link>
136+
<!-- Optical frame -->
137+
<joint name="${prefix}_optical_joint" type="fixed">
138+
<origin xyz="0 0 0" rpy="${-M_PI/2} 0 ${-M_PI/2}"/>
139+
<parent link="${prefix}_frame_link"/>
140+
<child link="${prefix}_optical_frame_link"/>
141+
</joint>
142+
<link name="${prefix}_optical_frame_link">
143+
<inertial>
144+
<mass value="0.1"/>
145+
<origin xyz="0 0 0"/>
146+
<xacro:solid_cuboid_inertia m="0.1" w="0.11" h="0.11" d="0.1" />
147+
</inertial>
148+
</link>
149+
<gazebo reference="${prefix}_base_link">
150+
<material>Gazebo/DarkGrey</material>
151+
</gazebo>
152+
153+
<!-- Axis sensor for simulation -->
154+
<xacro:sensor_link_750_nh_gazebo/>
155+
156+
</xacro:macro>
157+
158+
159+
<xacro:macro name="sensor_link_750_nh_gazebo">
160+
161+
<gazebo reference="${prefix}_frame_link"> <!-- the image will be generated from this (${name}_frame) point of view, with the front being the X axis -->
162+
<sensor type="camera" name="${prefix}_sensor">
163+
<update_rate>30.0</update_rate>
164+
<camera name="${prefix_topic}">
165+
<horizontal_fov>${60.0*M_PI/180.0}</horizontal_fov>
166+
<image>
167+
<format>R8G8B8</format>
168+
<width>640</width>
169+
<height>480</height>
170+
</image>
171+
<clip>
172+
<near>${near}</near>
173+
<far>${far}</far>
174+
</clip>
175+
</camera>
176+
<plugin name="${prefix}_controller" filename="libgazebo_ros_camera.so">
177+
<alwaysOn>true</alwaysOn>
178+
<updateRate>0.0</updateRate>
179+
<cameraName>${prefix_topic}</cameraName>
180+
<imageTopicName>image_raw</imageTopicName>
181+
<cameraInfoTopicName>camera_info</cameraInfoTopicName>
182+
<frameName>${prefix}_optical_frame_link</frameName>
183+
<!-- this is just which name the Image msg will have, it does not affect the simulation.
184+
However must be set to the optical_frame, -->
185+
<hackBaseline>0.07</hackBaseline>
186+
<distortionK1>0.0</distortionK1>
187+
<distortionK2>0.0</distortionK2>
188+
<distortionK3>0.0</distortionK3>
189+
<distortionT1>0.0</distortionT1>
190+
<distortionT2>0.0</distortionT2>
191+
<ignoreTfPrefix>1</ignoreTfPrefix>
192+
</plugin>
193+
</sensor>
194+
</gazebo>
195+
196+
</xacro:macro>
197+
198+
</robot>

0 commit comments

Comments
 (0)