ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

ahanaga's profile - activity

2016-12-26 17:43:59 -0500 received badge  Famous Question (source)
2016-09-27 14:45:07 -0500 received badge  Notable Question (source)
2016-09-16 03:16:26 -0500 received badge  Supporter (source)
2016-09-15 20:46:23 -0500 commented question range_sensor_layer error

Thanks for your reply. I modified my rate, so now It's ok.

2016-09-15 17:11:33 -0500 received badge  Popular Question (source)
2016-09-15 04:29:44 -0500 received badge  Editor (source)
2016-09-15 01:44:54 -0500 asked a question range_sensor_layer error

Hi all, I am using four sonar sensor and Hokuyo laser for navigation. I am using range_sensor_layer for sonar sensor. The problem is when I publish the sensor_msgs/Range message and use the range_sensor_layer, I get the following error:

[ERROR] [1473920347.325424279]: Range sensor layer can't transform from odom to sonar_one_range at 1473920347.167207

I am not able to see why am I getting this error as the tf tree is properly set up and there is a transformation from odom to sonar_one_range.

tf tree: link text

costmap_common_params.yaml

obstacle_range: 3.0
raytrace_range: 3.0

footprint: [[0.30, 0.0], [0.30,-0.25], [0.0, -0.25], [-0.30, -0.25], [-0.30,0.0], [-0.30, 0.25], [0.0, 0.25], [0.30, 0.25]]
#robot_radius: 0.5
inflation_radius: 0.2

max_obstacle_height: 0.6
min_obstacle_height: 0.0

obstacle_layer:
   observation_sources: scan
   scan:
      data_type: LaserScan
      topic: scan
      marking: true
      clearing: true
      expected_update_rate: 0.0
      observation_persistence: 0.0

range_sensor_layer:
   ns: /sensors/sonar_sensor
   topics: ["sonar_one_range","sonar_two_range","sonar_three_range","sonar_four_range"]
   no_readings_timeout: 0.0
   clear_threshold: 2.0
   mark_threshold: 8.0
   clear_on_max_reading: true

local_costmap_params.yaml

local_costmap:
   global_frame: /odom
   robot_base_frame: /base_link
   update_frequency: 2.0
   publish_frequency: 2.0
   static_map: false
   rolling_window: true
   width: 2.0
   height: 2.0
   resolution: 0.1
   transform_tolerance: 1.0
   plugins:
     - {name: obstacle_layer, type: "costmap_2d::VoxelLayer"}
     - {name: range_sensor_layer, type: "range_sensor_layer::RangeSensorLayer"}

global_costmap_params.yaml

global_costmap:
   map_type: costmap
   global_frame: /map
   robot_base_frame: /base_link
   update_frequency: 3.0
   publish_frequency: 3.0
   static_map: true
   rolling_window: false
   resolution: 0.1
   transform_tolerance: 1.0

sonar_one_range message:

---
header: 
  seq: 2
  stamp: 
    secs: 1473931687
    nsecs: 574187994
  frame_id: sonar_one_range
radiation_type: 1
field_of_view: 0.05
min_range: 0.15000000596
max_range: 6.0
range: 0.319999992847
---

Does anyone have any idea what is going wrong here? Please let me know if you need more information from me. Any help will be appreciated.

2016-07-09 09:37:40 -0500 received badge  Famous Question (source)
2016-07-09 09:37:40 -0500 received badge  Notable Question (source)
2016-04-28 15:42:25 -0500 received badge  Popular Question (source)
2016-03-09 21:17:07 -0500 asked a question range_sensor_layer can't transform from odom to ir_ranger

Hi all, I am using ir sensor and Hokuyo laser for navigation. I am using range_sensor_layer for ir sensor. The problem is when I publish the sensor_msgs/Range message and use the range_sensor_layer, I get the following error:

[ERROR] [1457576623.750078440]: Range sensor layer can't transform from odom to ir_ranger at 1457576623.464401

I am not able to see why am I getting this error as the tf tree is properly set up and there is a transformation from odom to ir_ranger: image description

costmap_common_params.yaml

obstacle_range: 7.0
raytrace_range: 7.0

footprint: [[0.40, 0.40], [0.40, -0.40], [-0.40, -0.40], [-0.40, 0.40]]
#robot_radius: 0.5
inflation_radius: 0.1

max_obstacle_height: 0.3
min_obstacle_height: 0.0

obstacle_layer:
   observation_sources: scan
   scan: 
      data_type: LaserScan
      topic: scan 
      marking: true
      clearing: true
      expected_update_rate: 0.0
      observation_persistence: 0.0

range_sensor_layer:
   ns: ""
   topics: ["ir_ranger_topic"]
   no_readings_timeout: 0.0
   clear_threshold: 2.0
   mark_threshold: 8.0
   clear_on_max_reading: true

local_costmap_params.yaml

local_costmap:
   global_frame: /odom
   robot_base_frame: /base_link
   update_frequency: 3.0
   publish_frequency: 1.0
   static_map: false
   rolling_window: true
   width: 6.0
   height: 6.0
   resolution: 0.05
   transform_tolerance: 1.0

   plugins:
     - {name: obstacle_layer, type: "costmap_2d::VoxelLayer"}
     - {name: range_sensor_layer, type: "range_sensor_layer::RangeSensorLayer"}

global_costmap_params.yaml

global_costmap:
   global_frame: /map
   robot_base_frame: /base_link
   map_type: costmap
   update_frequency: 3.0
   publish_frequency: 1.0
   static_map: true
   rolling_window: false
   resolution: 0.05
   transform_tolerance: 0.5

   plugins:
     - {name: obstacle_layer, type: "costmap_2d::VoxelLayer"}
     - {name: range_sensor_layer, type: "range_sensor_layer::RangeSensorLayer"}

robot.urdf

<?xml version="1.0"?>  
<robot name="gobot">  
  <link name="base_link">  
    <visual>  
      <geometry>  
        <box size="0.629 .500 .097"/>  
      </geometry>  
      <material name="white">  
         <color rgba="1 1 1 .5"/>  
    </material>  
    </visual>  
  </link>  

  <link name="base_laser">
    <visual>
      <geometry>
        <box size="0.00 0.05 0.06" />
      </geometry>
      <material name="Green" />
    </visual>
    <inertial>
      <mass value="0.000001" />
      <origin xyz="0 0 0" />
      <inertia ixx="0.0001" ixy="0.0" ixz="0.0" iyy="0.0001" iyz="0.0" izz="0.0001" />
    </inertial>
  </link>

  <joint name="laser_to_link" type="fixed">
    <origin xyz="0.0 0.00 0.0" rpy="0 0 0" />
    <parent link="base_link" />
    <child link="base_laser" />
  </joint>

  <link name="ir_ranger">
    <visual>
      <geometry>
        <box size="0.00 0.05 0.06" />
      </geometry>
      <material name="Green" />
    </visual>
    <inertial>
      <mass value="0.000001" />
      <origin xyz="0 0 0" />
      <inertia ixx="0.0001" ixy="0.0" ixz="0.0" iyy="0.0001" iyz="0.0" izz="0.0001" />
    </inertial>
  </link>

  <joint name="rear_link" type="fixed">
    <origin xyz="-0.35 0.00 0.0" rpy="0 0 3.14" />
    <parent link="base_link" />
    <child link="ir_ranger" />
  </joint>

</robot>

launch

<?xml version="1.0"?>
<launch>

  <arg name="model" default="$(find beginner_tutorials)/urdf/robot.urdf"/>
  <arg name="gui" default="False" />
  <param name="robot_description" textfile="$(arg model)" />
  <param name="use_gui" value="$(arg gui)"/>

  <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" >
    <param name="publish_frequency" type="double" value="5.0" />
  </node>
  <node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher" >
    <param name="publish_frequency" type="double" value="5.0" />
  </node>

  <node pkg="hector_mapping" type="hector_mapping" name="hector_height_mapping" output="screen">
    <param name="scan_topic" value="scan" />
    <param name="map_frame" value="map" />
    <param name="base_frame" value="base_link" />
    <param name ...
(more)