Gazebo | Ignition | Community
Ask Your Question
0

Ray sensor pose tag does not work as expected

asked 2020-08-07 14:59:55 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hi

I'm using Gazebo version 9.13.2, and when I add a ray sensor to a link (model) if I set the sensor pose to 0's, in the simulation the ray is located in other position as can be seen in the attached figure.

image description

This is the code I'm using

<link name="base_link">
 <sensor name="laser" type="ray">
        <!-- Main properties -->
        <always_on>1</always_on>
        <visualize>true</visualize>
        <update_rate>10</update_rate>
        <pose> 0 0 0  0 0 0 </pose> <!-- This does not work well 0 0.2 0.1  0 0 0 -->
        <!-- Set descriptions specific to camera sensors -->
        <ray>
            <scan>
                <horizontal>
                    <samples>100</samples>
                    <resolution>1</resolution>
                    <min_angle>-0.5</min_angle>
                    <max_angle>0.5</max_angle>
                </horizontal>
                <vertical>
                    <samples>1</samples>
                    <resolution>1</resolution>
                    <min_angle>0</min_angle>
                    <max_angle>0</max_angle>
                </vertical>
            </scan>
            <range>
                <min>0</min>
                <max>10</max>
                <resolution>0.002</resolution>
            </range>
            <noise>
                <type>gaussian</type>
                <mean>0.0</mean>
                <stddev>0.001</stddev>
            </noise>
        </ray>
    </sensor>

</link>

is this the correct behavior? This does not happen with other sensors

Greetings

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-08-08 20:32:42 -0500

caioaamaral gravatar image

Check the base_link <link> tag. Maybe your mesh has the origin not at the geometric center, but at the corner (happens with solidworks stl files). Use the same coordinates that is under the intertial <origin> tag.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2020-08-07 14:59:55 -0500

Seen: 130 times

Last updated: Aug 08 '20