Adding a lidar scanner on a car
Dear all, I have exported a small car model from Solidworks to URDF and I am trying to add a lidar laser scanner at the top. I have already tried many things but haven't managed to make the lidar even appear on top of the car, in gazebo. Most of the time I get an error saying that gazebo URDF parser cannot parse the file.
I am using the gazebo7.
The URDF(without the lidar) is the following:
<?xml version="1.0" encoding="utf-8"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="robot">
<link
name="base_link">
<inertial>
<origin
xyz="0.00394152246605745 -0.175487321975129 -0.0315221316804128"
rpy="0 0 0" />
<mass
value="4.05665355311749" />
<inertia
ixx="0.0147593093765132"
ixy="-1.60349764774838E-07"
ixz="2.63848097894018E-07"
iyy="0.0259026379424139"
iyz="-0.000771824542874729"
izz="0.0208164827082191" />
</inertial>
<visual>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://robot/meshes/base_link.STL" />
</geometry>
<material
name="">
<color
rgba="0.752941176470588 0.752941176470588 0.752941176470588 1" />
</material>
</visual>
<collision>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://robot/meshes/base_link.STL" />
</geometry>
</collision>
</link>
<link
name="FL">
<inertial>
<origin
xyz="0.014 6.9389E-18 0"
rpy="0 0 0" />
<mass
value="0.061522" />
<inertia
ixx="5.5443E-05"
ixy="8.0237E-21"
ixz="-2.5215E-22"
iyy="3.0092E-05"
iyz="0"
izz="3.0092E-05" />
</inertial>
<visual>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://robot/meshes/FL.STL" />
</geometry>
<material
name="">
<color
rgba="0.29804 0.29804 0.29804 1" />
</material>
</visual>
<collision>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://robot/meshes/FL.STL" />
</geometry>
</collision>
</link>
<joint
name="FLJ"
type="continuous">
<origin
xyz="-0.14809 0.0035605 0.044019"
rpy="0.99029 0 -3.1416" />
<parent
link="base_link" />
<child
link="FL" />
<axis
xyz="1 0 0" />
</joint>
<link
name="FR">
<inertial>
<origin
xyz="-0.014 6.9389E-18 6.9389E-18"
rpy="0 0 0" />
<mass
value="0.061522" />
<inertia
ixx="5.5443E-05"
ixy="-1.9005E-20"
ixz="6.5291E-21"
iyy="3.0092E-05"
iyz="-1.0164E-20"
izz="3.0092E-05" />
</inertial>
<visual>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://robot/meshes/FR.STL" />
</geometry>
<material
name="">
<color
rgba="0.29804 0.29804 0.29804 1" />
</material>
</visual>
<collision>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://robot/meshes/FR.STL" />
</geometry>
</collision>
</link>
<joint
name="FRJ"
type="continuous">
<origin
xyz="0.15595 0.0035605 0.044019"
rpy="2.8107 0 -3.1416" />
<parent
link="base_link" />
<child
link="FR" />
<axis
xyz="1 0 0" />
< ...
do you see any errors with original URDF file,I mean without lidar ?
No. Everything loads and behaves perfectly.
Gazebo requires that each link has an
inertial
element to be simulated. http://gazebosim.org/tutorials/?tut=r... From your provided snippet it looks like the linklaz_base
doesn't have one.Also (but it may be because you copy pasted only part of the files) each opened tag in your xacro files needs a matching closing tag (
</link>
,</robot>
etc)Please see the answer above. I couldn't paste the amount of lines required to show you the .xarco so, I used the answer instead of the comment.
@John999991: please do not post answers unless you are answering your own question.
To provide additional information, edit your original question. You may use the
edit
button to do that.