Could not determine the type for the passed topic

asked 2021-08-11 03:51:09 -0500

zebo gravatar image

I am trying to make a ray sensor type. I am using ros dashing and gazebo 9. i followed the instructions here.

<?xml version="1.0" ?> 
<sdf version="1.5">   

<model name="foggy_lidar_n1">
<link name="link">
  <inertial>
    <pose>0 0 0 0 0 0</pose>
    <mass>0.19</mass>
    <inertia>
      <ixx>4.15e-6</ixx>
      <ixy>0</ixy>
      <ixz>0</ixz>
      <iyy>2.407e-6</iyy>
      <iyz>0</iyz>
      <izz>2.407e-6</izz>
    </inertia>
  </inertial>

  <visual name="visual">
    <geometry>
      <box>
        <size>0.02 0.05 0.05</size>
      </box>
    </geometry>
  </visual>

  <sensor name="laser" type="ray">
    <pose>0 0 0 0 1.51 0</pose>
    <always_on>1</always_on>
    <update_rate>30</update_rate>
    <visualize>true</visualize>
    <ray>
      <scan>
        <horizontal>
          <samples>512</samples>
          <resolution>1</resolution>
          <min_angle>-3.14</min_angle>
          <max_angle>3.14</max_angle>
        </horizontal>
      </scan>
      <range>
        <min>0.06</min>
        <max>15</max>
        <resolution>0.05</resolution>
      </range>
      <noise>
        <type>gaussian</type>
        <mean>0.0</mean>
        <stddev>0.01</stddev>
      </noise>
    </ray>
    <plugin name="laser" filename="/opt/ros/dashing/lib/libgazebo_ros_ray_sensor.so">
       <ros>
      <namespace>/laser</namespace>
      <argument>~/out:=scan</argument> 
     </ros>
     <output_type>sensor_msgs/LaserScan</output_type>
   </plugin>       
  </sensor>
</link>   
</model> 
</sdf>

when i list out topics i get the topics as

/clock [rosgraph_msgs/msg/Clock]
/laser/parameter_events [rcl_interfaces/msg/ParameterEvent]
/laser/rosout [rcl_interfaces/msg/Log]
/laser/scan [sensor_msgs/msg/LaserScan]
/parameter_events [rcl_interfaces/msg/ParameterEvent]
/rosout [rcl_interfaces/msg/Log]

but whenever i echo the topic /laser/scan; it sometimes shows data, and sometimes says that "it can not determine the type for the passed topic"

How do i make sure that the data is always there, what could be going wrong here. Thanks.

here are the relevant terminal output

[INFO] [gzserver-1]: process started with pid [28856]
[INFO] [gzclient --verbose  -2]: process started with pid [28858]
[INFO] [gz-3]: process started with pid [28860]
[INFO] [xterm-4]: process started with pid [28862]
[gzclient --verbose  -2] Gazebo multi-robot simulator, version 9.0.0
[gzclient --verbose  -2] Copyright (C) 2012 Open Source Robotics Foundation.
[gzclient --verbose  -2] Released under the Apache 2 License.
[gzclient --verbose  -2] http://gazebosim.org
[gzclient --verbose  -2] 
[gzserver-1] Gazebo multi-robot simulator, version 9.0.0
[gzserver-1] Copyright (C) 2012 Open Source Robotics Foundation.
[gzserver-1] Released under the Apache 2 License.
[gzserver-1] http://gazebosim.org
[gzserver-1] 
[gzclient --verbose  -2] [Msg] Waiting for master.
[gzclient --verbose  -2] [Msg] Connected to gazebo master @ http://127.0.0.1:11345
[gzclient --verbose  -2] [Msg] Publicized address: 192.168.2.1
[gzclient --verbose  -2] [Err] [InsertModelWidget.cc:405] Missing model.config for model "/home/aamir/.gazebo/models/.git"
[gzclient --verbose  -2] [Err] [InsertModelWidget.cc:405] Missing model.config for model "/home/aamir/.gazebo/models/gazebo_models"
[gzclient --verbose  -2] [Wrn] [Event.cc:61] Warning: Deleting a connection right after creation. Make sure to save the ConnectionPtr from a Connect call
[gzclient --verbose  -2] [Err] [REST.cc:205] Error in REST request
[gzclient --verbose  -2] 
[gzclient --verbose  -2] libcurl: (51) SSL: no alternative certificate subject name matches target host name 'api.ignitionfuel.org'
[gzclient --verbose  -2] [Err] [ModelDatabase.cc:390] Unable to parse ...
(more)
edit retag flag offensive close merge delete