Skip to content

Instantly share code, notes, and snippets.

@mathewthomas916
mathewthomas916 / GPS
Created July 28, 2020 19:30
ROS2 URDF Gazebo Sensor
<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>
@mathewthomas916
mathewthomas916 / IMU
Created July 28, 2020 19:29
ROS2 URDF Gazebo Sensor
<gazebo reference="imu_link">
<sensor name="br_imu" type="imu">
<always_on>true</always_on>
<update_rate>100</update_rate>
<imu>
<angular_velocity>
<x>
<noise type="gaussian">
<mean>0.0</mean>
<stddev>2e-4</stddev>
@mathewthomas916
mathewthomas916 / Position 3d
Created July 28, 2020 19:28
ROS2 URDF Gazebo Sensor
<gazebo>
<plugin name="t260_emulation" filename="libgazebo_ros_p3d.so">
<ros>
<namespace>t260</namespace>
<remapping>odom:=odom</remapping>
</ros>
<frame_name>map</frame_name>
<body_name>base_link</body_name>
<update_rate>200.0</update_rate>
<gaussian_noise>0.01</gaussian_noise>
@mathewthomas916
mathewthomas916 / Joint State Publisher
Created July 28, 2020 19:27
ROS2 URDF Gazebo Sensor
<gazebo>
<plugin name="bytes_joint_state" filename="libgazebo_ros_joint_state_publisher.so">
<ros>
<!-- <namespace>/br</namespace> -->
<remapping>~/out:=joint_states</remapping>
</ros>
<update_rate>30</update_rate>
<joint_name>left_wheel_joint</joint_name>
<joint_name>right_wheel_joint</joint_name>
</plugin>
<gazebo>
<plugin name="bytes_diff_drive" filename="libgazebo_ros_diff_drive.so">
<ros>
<!-- <namespace>/br</namespace> -->
</ros>
<update_rate>30</update_rate>
<!-- wheels -->
@mathewthomas916
mathewthomas916 / RGB Camera
Created July 28, 2020 19:22
ROS2 URDF Gazebo Sensor
<gazebo reference="${name}_link">
<sensor type="camera" name="${name}">
<always_on>true</always_on>
<update_rate>15.0</update_rate>
<camera name="${name}">
<horizontal_fov>1.46608</horizontal_fov>
<image>
<width>320</width>
<height>180</height>
<format>R8G8B8</format>
@mathewthomas916
mathewthomas916 / Depth Camera
Created July 28, 2020 19:19
ROS2 URDF Gazebo Sensor
<gazebo reference="${name}_link">
<sensor name="${name}" type="depth">
<always_on>true</always_on>
<update_rate>15</update_rate>
<pose>0 0 0 0 0 0</pose>
<camera name="realsense_depth_camera">
<horizontal_fov>1.46608</horizontal_fov>
<image>
<width>424</width>
<height>240</height>
@mathewthomas916
mathewthomas916 / Range Sensor
Created July 27, 2020 19:55
ROS2 URDF Gazebo Sensor
<gazebo reference="${name}_dist_sensor">
<sensor name="${name}_ultrasound" type="ray">
<always_on>true</always_on>
<visualize>false</visualize>
<pose>0.0 0 0.0 0 0 0</pose>
<update_rate>50</update_rate>
<ray>
<scan>
<horizontal>
<samples>5</samples>
@mathewthomas916
mathewthomas916 / Laser Scanner
Created July 27, 2020 19:50
ROS2 URDF Gazebo Sensor Share
<gazebo reference="scanner_link">
<sensor name="rplidar_a3" type="ray">
<always_on>true</always_on>
<visualize>false</visualize>
<pose>0.0 0 0.0 0 0 0</pose>
<update_rate>15</update_rate>
<ray>
<scan>
<horizontal>
<samples>667</samples>
@mathewthomas916
mathewthomas916 / Bumper part 2
Created July 27, 2020 19:47
ROS2 URDF Gazebo Sensor
<!-- Add chassis and inertial link -->
<link name="chassis">
<interial>
<xacro:chassis_inertial_params/>
</interial>
<visual>
<xacro:chassis_geometry/>
<material name="white" />
</visual>
<collision name="chassis_collision">