-
-
Save mathewthomas916/b05dc0cc6518251b485b84d0e34a6063 to your computer and use it in GitHub Desktop.
ROS2 URDF Gazebo Sensor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<gazebo reference="gps_link"> | |
<sensor name="gps_sensor" type="gps"> | |
<always_on>true</always_on> | |
<update_rate>1.0</update_rate> | |
<plugin name="gps_controller" filename="libgazebo_ros_gps_sensor.so"> | |
<ros> | |
<!-- <namespace>/br</namespace> --> | |
<remapping>gps_controller/out:=gps</remapping> | |
</ros> | |
<frame_name>gps_link</frame_name> | |
</plugin> | |
</sensor> | |
<material>Gazebo/Grey</material> | |
</gazebo> |
Hey Did you figure out how to set reference Lat and Lon?
id your gazebo world sdf file
<spherical_coordinates> <surface_model>EARTH_WGS84</surface_model> <latitude_deg>-37.644121</latitude_deg> <longitude_deg>176.183812</longitude_deg> <elevation>0</elevation> <heading_deg>0</heading_deg> </spherical_coordinates>
How do you add noise to the sensor? I've tried and under sensor and plugin and nothing works.
I'm not sure you can for GPS.
You can however for IMU
<xacro:macro name="noize_gaussian" params="dev b_mean b_dev">
<noise type="gaussian">
<mean>0.0</mean>
<stddev>${dev}</stddev>
<bias_mean>${b_mean}</bias_mean>
<bias_stddev>${b_dev}</bias_stddev>
</noise>
</xacro:macro>
<angular_velocity>
<x>
<xacro:noize_gaussian dev="2e-4" b_mean="0.0000075" b_dev="0.0000008"/>
</x>
<y>
<xacro:noize_gaussian dev="2e-4" b_mean="0.0000075" b_dev="0.0000008"/>
</y>
<z>
<xacro:noize_gaussian dev="2e-4" b_mean="0.0000075" b_dev="0.0000008"/>
</z>
</angular_velocity>
<linear_acceleration>
<x>
<xacro:noize_gaussian dev="1.7e-2" b_mean="0.1" b_dev="0.001"/>
</x>
<y>
<xacro:noize_gaussian dev="1.7e-2" b_mean="0.1" b_dev="0.001"/>
</y>
<z>
<xacro:noize_gaussian dev="1.7e-2" b_mean="0.1" b_dev="0.001"/>
</z>
</linear_acceleration>
</imu>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How do you set reference Latitude and Longitude ?