Ask Your Question
0

Same tf tree changes some frames

asked 2016-08-24 04:24:21 -0500

patrchri gravatar image

updated 2016-08-24 04:46:09 -0500

Hello,

I am running hector_mapping and hector_exploration_node after roslaunching my robot in gazebo and today I noticed that the tf tree changes from time to time:

image description

image description

image description

I also ran roswtf and I got the following issues, which I don't know if they are indirectly relevant to the tf trees above:

Loaded plugin tf.tfwtf
No package or stack in context
================================================================================
Static checks summary:

No errors or warnings
================================================================================
Beginning tests of your ROS graph. These may take awhile...
analyzing graph...
... done analyzing graph
running graph rules...
ERROR: connection refused to [http://legged-HP-ProBook-450-G2:44318/]
... done running graph rules
running tf checks, this will take a second...
... tf checks complete

Online checks summary:

Found 2 warning(s).
Warnings are things that may be just fine, but are sometimes at fault

WARNING The following node subscriptions are unconnected:
 * /hector_mapping:
   * /syscommand
 * /gazebo:
   * /gazebo/set_model_state
   * /gazebo/set_link_state
   * /labrob/cmd_vel

WARNING These nodes have died:
 * labrob_spawn-3


Found 3 error(s).

ERROR Could not contact the following nodes:
 * /rviz_1472030068686009566

ERROR The following nodes should be connected but aren't:
 * /gazebo->/rviz_1472030068686009566 (/tf)
 * /hector_exploration_node->/hector_exploration_node (/hector_exploration_node/global_costmap/footprint)
 * /hector_mapping->/rviz_1472030068686009566 (/tf)
 * /robot_state_publisher->/rviz_1472030068686009566 (/tf_static)
 * /rviz_1472030068686009566->/hector_mapping (/initialpose)
 * /tf_broadcaster_node->/rviz_1472030068686009566 (/tf)
 * /robot_state_publisher->/rviz_1472030068686009566 (/tf)
 * /gazebo->/rviz_1472030068686009566 (/clock)

ERROR Errors connecting to the following services:
 * service [/rviz_1472030068686009566/get_loggers] appears to be malfunctioning: Unable to communicate with service [/rviz_1472030068686009566/get_loggers], address [rosrpc://legged-HP-ProBook-450-G2:59065]
 * service [/rviz_1472030068686009566/set_logger_level] appears to be malfunctioning: Unable to communicate with service [/rviz_1472030068686009566/set_logger_level], address [rosrpc://legged-HP-ProBook-450-G2:59065]

I have the following launch file for my hector_mapping node:

<?xml version="1.0"?>

<launch>
  <arg name="tf_map_scanmatch_transform_frame_name" default="scanmatcher_frame"/>
  <arg name="base_frame" default="base_link"/>
  <arg name="odom_frame" default="base_link"/>
  <arg name="pub_map_odom_transform" default="false"/>
  <arg name="scan_subscriber_queue_size" default="5"/>
  <arg name="scan_topic" default="/labrob/laser/scan"/>
  <arg name="map_size" default="2048"/>

  <node pkg="hector_mapping" type="hector_mapping" name="hector_mapping" output="screen">

    <!-- Frame names -->
    <param name="map_frame" value="map" />
    <param name="base_frame" value="$(arg base_frame)" />
    <param name="odom_frame" value="$(arg odom_frame)" />

    <!-- Tf use -->
    <param name="use_tf_scan_transformation" value="false"/>
    <param name="use_tf_pose_start_estimate" value="false"/>
    <param name="pub_map_odom_transform" value="$(arg pub_map_odom_transform)"/>

    <!-- Map size / start point -->
    <param name="map_resolution" value="0.050"/>
    <param name="map_size" value="$(arg map_size)"/>
    <param name="map_start_x" value="0.5"/>
    <param name="map_start_y" value="0.5" />
    <param name="map_multi_res_levels" value="2" />

    <!-- Map update parameters -->
    <param name="update_factor_free" value="0.4"/>
    <param name="update_factor_occupied" value="0.9" />    
    <param name="map_update_distance_thresh" value="0.01"/>
    <param name="map_update_angle_thresh" value="0.001" />
    <param name="laser_z_min_value" value = "-1.0" />
    <param name="laser_z_max_value" value = "1.0" />

    <!-- Advertising config --> 
    <param name="advertise_map_service" value="true"/>

    <param name="scan_subscriber_queue_size" value="$(arg scan_subscriber_queue_size)"/>
    <param name="scan_topic" value="$(arg scan_topic)"/>

    <!-- Debug parameters -->
    <!--
      <param name="output_timing" value="false"/>
      <param name="pub_drawings" value="true"/>
      <param name="pub_debug_output" value="true"/>
    -->
    <param name="tf_map_scanmatch_transform_frame_name" value="$(arg tf_map_scanmatch_transform_frame_name)" />
  </node>

  <!--<node pkg="tf" type="static_transform_publisher" name="map_nav_broadcaster" args="0 0 0 0 0 0 map nav 100"/>-->
</launch>

I wanted to ask what is going on and if this is an error that could lead to wrong robot's behavior during autonomous exploration ?

edit retag flag offensive close merge delete

Comments

2

Where is the difference between the trees? The ordering of the nodes after the base link is arbitrary so these trees are exactly the same (if I don't miss something important)

PickBot gravatar imagePickBot ( 2016-08-24 06:20:04 -0500 )edit

Thank you for your answer :)

I found this arbitrary positions of the frames weird, that's why I asked in case I have forgotten something.

patrchri gravatar imagepatrchri ( 2016-08-24 12:58:41 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-08-24 07:46:43 -0500

Airuno2L gravatar image

Yeah I agree with Pickbot, I don't notice anything wrong with the difference of the trees, the links are the same, they're just arranged on the visual differently which doesn't mean anything.

One thing that is potentially wrong is that map is supposed to be the root of all trees as far as I know. It usually goes like this: map --> odom --> base_link

More information about these frames can be found here.

edit flag offensive delete link more

Comments

Thank you for your answer :)

The hector_exploration_node requires a base_link to map transform (even though the hector_mapping gives other tf) that's why I haven't put the map as the root of the tree. I don't know if I am missing something though, because I am generally new to autonomous navigation

patrchri gravatar imagepatrchri ( 2016-08-24 13:01:18 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-08-24 04:24:21 -0500

Seen: 200 times

Last updated: Aug 24 '16