Navigation2 Collision Monitor with Multiple Data Sources

asked 2023-06-12 21:33:31 -0500

elladuncan14 gravatar image

updated 2023-06-14 20:12:26 -0500

Hi there,

I am trying to setup NAV2 collision monitor with a lidar and radar working together, so I can use the system for a fuzzing technique. I am a software/security person, and do not have a whole lot of experience with the physical aspects of ROS. I tried altering the turtlebot3_waffle.urdf to add a radar, but when I launch the tb3_simulation, I can't see the component in Gazebo. I am certain that what I have is not right as I only added a couple lines of code that I based off the given base_scan. I am hoping someone could help me complete the URDF correctly, and help me confirm what topic this simulated radar will be published to. Any help would be very appreciated, thank you so much!

What I added to the turtlebot3_waffle.urdf, directly after the base_scan lines:

 <!--Modification: Here we add the joint and link for the front IR sensor-->

  <joint name="ir_front_joint" type="fixed">
    <parent link="base_link"/>
    <child link="base_ir_front"/>
    <origin rpy="0 0 0" xyz="0.5 0 0"/>
    <axis xyz="0 1 0" />

  <link name="base_ir_front">
      <origin xyz="0 0 0" rpy="0 0 0"/>
        <box size="0.01 0.01 0.01"/>
      <material name="dark"/>

      <origin xyz="0 0 0" rpy="0 0 0"/>
        <box size="0.01 0.01 0.01"/>

      <mass value="1e-5" />
      <origin xyz="0 0 0" rpy="0 0 0"/>
      <inertia ixx="1e-6" ixy="0" ixz="0"
               iyy="1e-6" iyz="0"
               izz="1e-6" />

  <!--End of Modification-->

  <!--Modification: Here we add the plugin for the IR sensor-->
  <gazebo reference="base_ir_front">    
    <sensor type="gpu_ray" name="range_sensor">
      <!-- Using gazebo's noise instead of plugin's -->
    <!-- Using gazebo's update rate instead of plugin's -->
    <plugin name="gazebo_ros_range_controller" filename="">
      <!-- Change namespace and output topic so published topic is /rrbot/laser/scan -->
      <!-- Set output to sensor_msgs/Range to get same output type as gazebo_ros_range -->
      <!-- <frame_name> ommited, will default to range_link -->
  <!--End of plugin Modification-->

Once I run the initial Nav2 simualtion (ros2 launch nav2_bringup headless:=False) and examine the ros topic lists, I can see that this range topic is not showing up. See topic list below:

/plan ...
edit retag flag offensive close merge delete