Skip to content

Commit

Permalink
tag aruco on the robot
Browse files Browse the repository at this point in the history
  • Loading branch information
Thiefish committed Jan 17, 2024
1 parent 08eb758 commit 8f37516
Show file tree
Hide file tree
Showing 6 changed files with 133 additions and 3 deletions.
10 changes: 10 additions & 0 deletions src/ezbot_descr_simul/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,14 @@ install(
DESTINATION share/${PROJECT_NAME}
)

install(
DIRECTORY media/
DESTINATION $ENV{HOME}/.gazebo/media/
)


install(DIRECTORY media/
DESTINATION share/${PROJECT_NAME}/media/
)

ament_package()
98 changes: 98 additions & 0 deletions src/ezbot_descr_simul/description/imu.xacro
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" >

<joint name="imu_joint" type="fixed">
<parent link="chassis"/>
<child link="imu_link"/>
<origin xyz="0.055 0 0.175" rpy="0 0 0"/>
</joint>

<link name="imu_link">
<visual>
<geometry>
<box size="0.03 0.03 0.03"/>
</geometry>
<material name="black"/>
</visual>
</link>


<gazebo reference="imu_link">
<material>Gazebo/Black</material>

<gravity>true</gravity>
<sensor name="imu_sensor" type="imu">
<always_on>true</always_on>
<update_rate>100</update_rate>
<visualize>true</visualize>
<topic>__default_topic__</topic>
<plugin filename="libgazebo_ros_imu_sensor.so" name="imu_plugin">
<topicName>imu</topicName>
<bodyName>imu_link</bodyName>
<updateRateHZ>10.0</updateRateHZ>
<gaussianNoise>0.0</gaussianNoise>
<xyzOffset>0 0 0</xyzOffset>
<rpyOffset>0 0 0</rpyOffset>
<frameName>imu_link</frameName>
<initialOrientationAsReference>false</initialOrientationAsReference>
</plugin>
<pose>0 0 0 0 0 0</pose>
<imu>
<angular_velocity>
<x>
<noise type="gaussian">
<mean>0.0</mean>
<stddev>2e-4</stddev>
<bias_mean>0.0000075</bias_mean>
<bias_stddev>0.0000008</bias_stddev>
</noise>
</x>
<y>
<noise type="gaussian">
<mean>0.0</mean>
<stddev>2e-4</stddev>
<bias_mean>0.0000075</bias_mean>
<bias_stddev>0.0000008</bias_stddev>
</noise>
</y>
<z>
<noise type="gaussian">
<mean>0.0</mean>
<stddev>2e-4</stddev>
<bias_mean>0.0000075</bias_mean>
<bias_stddev>0.0000008</bias_stddev>
</noise>
</z>
</angular_velocity>
<linear_acceleration>
<x>
<noise type="gaussian">
<mean>0.0</mean>
<stddev>1.7e-2</stddev>
<bias_mean>0.1</bias_mean>
<bias_stddev>0.001</bias_stddev>
</noise>
</x>
<y>
<noise type="gaussian">
<mean>0.0</mean>
<stddev>1.7e-2</stddev>
<bias_mean>0.1</bias_mean>
<bias_stddev>0.001</bias_stddev>
</noise>
</y>
<z>
<noise type="gaussian">
<mean>0.0</mean>
<stddev>1.7e-2</stddev>
<bias_mean>0.1</bias_mean>
<bias_stddev>0.001</bias_stddev>
</noise>
</z>
</linear_acceleration>
</imu>

</sensor>
</gazebo>

</robot>
2 changes: 1 addition & 1 deletion src/ezbot_descr_simul/description/robot.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
<xacro:include filename="lidar.xacro"/>
<xacro:include filename="gazebo_control.xacro" />
<xacro:include filename="camera.xacro" />

<xacro:include filename="imu.xacro" />
</robot>
12 changes: 10 additions & 2 deletions src/ezbot_descr_simul/description/robot_core.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,16 @@
</xacro:inertial_box>
</link>

<gazebo reference="bloc_aruco">
<material>aruco/material</material>
<gazebo reference="bloc_aruco" link="">
<visual>
<material>
<script>
<uri>$(find ezbot_descr_simul)/media/materials/scripts</uri>
<uri>$(find ezbot_descr_simul)/media/materials/textures</uri>
<name>arucoMat</name>
</script>
</material>
</visual>
</gazebo>
<!--bloc avant-->

Expand Down
14 changes: 14 additions & 0 deletions src/ezbot_descr_simul/media/materials/scripts/aruco.material
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
material arucoMat
{
receive_shaddows off
technique
{
pass
{
texture_unit
{
texture aruco_id0.png
}
}
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8f37516

Please sign in to comment.