Adding white border around aruco marker.

asked 2022-01-28 15:21:50 -0600

Roaz gravatar image

Hello, I have an aruco marker of about 0.15 m, but I don't feel like it has enough padding. Look like this:

image description

The issue I have is that I'm using a png as the texture and had to go through a lot of effort to scale the marker so that the black marker excluding the padding was 0.15m. I tried taking some inspiration from this sdf file (https://github.com/joselusl/aruco_gaz...) to add some padding, but since my turtlebot is moving and the padding is attached to the marker, it caused some issues with the physics.

Wondering how I could add padding while making sure that the black marker remains at 0.15m. Adding my marker model file.

Model.sdf:

<?xml version="1.0"?>
<sdf version="1.6">
  <model name="marker_1">
    <link name="link">
      <inertial>
        <pose>0 0 0 0 0 0</pose>
        <mass>0.001</mass>
        <inertia>
          <ixx>3.7499999999999997e-06</ixx>
          <ixy>0.0</ixy>
          <ixz>0.0</ixz>
          <iyy>1.8750008333333333e-06</iyy>
          <iyz>0.0</iyz>
          <izz>1.8750008333333333e-06</izz>
        </inertia>
      </inertial>
      <visual name="front_visual">
        <pose>0.00005 0 0 0 0 0</pose>
        <geometry>
          <box>
            <size>0.0001 0.171 0.171</size>
          </box>
        </geometry>
        <material>
          <script>
            <uri>model://marker_2/materials/scripts</uri>
            <uri>model://marker_2/materials/textures</uri>
            <name>vrc/marker</name>
          </script>
        </material>
      </visual>
      <!-- Hide the marker from the back -->
      <visual name="rear_visual">
        <pose>-0.00005 0 0 0 0 0</pose>
        <geometry>
          <box>
            <size>0.0001 0.171 0.171</size>
          </box>
        </geometry>
      </visual>
      <collision name="collision">
        <pose>0 0 0 0 0 0</pose>
        <geometry>
          <box>
            <size>0.0001 0.171 0.171</size>
          </box>
        </geometry>
      </collision>
    </link>
  </model>
</sdf>

script:

material vrc/marker
{
    receive_shadows off
    technique
    {
        pass
        {
            texture_unit
            {
                texture marker_border2.png
                filtering anistropic
                max_anisotropy 16
                scale 1 1
            }
        }
    }
}

Texture: image description

edit retag flag offensive close merge delete