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

Trajectory during the mapping

asked 2016-03-09 05:50:53 -0600

papaclaudia gravatar image

Hi! I can make a map with xv-11 and hector slam. I have this part in slam.launch file:

[...]
<include file="$(find hector_mapping)/launch/mapping_default.launch"/>
<node pkg="rviz" type="rviz" name="rviz" args="-d rviz_cfg.rviz"/>
<include file="$(find hector_geotiff)/launch/geotiff_mapper.launch"/>
<arg name="trajectory_source_frame_name" default="/base_link"/>
<arg name="trajectory_update_rate" default="4"/>
<arg name="trajectory_publish_rate" default="0.25"/>
[...]

and this is geotiff_mapper.launch file:

<launch>
<arg name="trajectory_source_frame_name" default="/base_link"/>
<arg name="trajectory_update_rate" default="4"/>
<arg name="trajectory_publish_rate" default="0.25"/>
<arg name="map_file_path" default="$(find hector_geotiff)/maps"/>
<arg name="map_file_base_name" default="hector_slam_map"/>
<node pkg="hector_trajectory_server" type="hector_trajectory_server" name="hector_trajectory_server" output="screen">
<param name="target_frame_name" type="string" value="/map"/>
<param name="source_frame_name" type="string" value="$(arg trajectory_source_frame_name)"/>
<param name="trajectory_update_rate" type="double" value="$(arg trajectory_update_rate)"/>
<param name="trajectory_publish_rate" type="double" value="$(arg trajectory_publish_rate)"/>
</node>
<node pkg="hector_geotiff" type="geotiff_node" name="hector_geotiff_node" output="screen" launch-prefix="nice -n 15">
<remap from="map" to="/dynamic_map"/>
<param name="map_file_path" type="string" value="$(arg map_file_path)"/>
<param name="map_file_base_name" type="string" value="$(arg map_file_base_name)"/>
<param name="geotiff_save_period" type="double" value="0"/>
<param name="draw_background_checkerboard" type="bool" value="true"/>
<param name="draw_free_space_grid" type="bool" value="true"/>
<param name="plugins" type="string" value="hector_geotiff_plugins/TrajectoryMapWriter"/>
</node>
</launch>

I would like to trace the trajectory when the lidar moves in the environment. How do I launch the hector_trajectory_server node? In rviz what to add in the display to the left? Which topic? Thank you!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2016-03-10 06:23:15 -0600

papaclaudia gravatar image

I solved it by changing this:

<param name="trajectory_source_frame_name" value="scanmatcher_frame"/>

in slam.launch and in geotiff_mapper.launch.

edit flag offensive delete link more
0

answered 2016-03-09 08:17:44 -0600

Orhan gravatar image

Add 'Path' visualization in rViz and set its topic to trajectory. I think It will be work, I haven't work with this package. Readed topic name from hector_trajectory_server wiki page:

Published Topics:

trajectory (nav_msgs/Path)

Get the traveled trajectory from this latched topic.

edit flag offensive delete link more

Comments

Unfortunately it's not enough what you say. Thanks anyway for having responded to me!

papaclaudia gravatar image papaclaudia  ( 2016-03-09 09:58:21 -0600 )edit

Someone marked correct my answer. I think I must explain. You are launching rViz in there: <node pkg="rviz" type="rviz" name="rviz" args="-d rviz_cfg.rviz"/> Open rViz window and click add button(bottom left) and add Path. Then set its topic to trajectory (just select from combobox).

Orhan gravatar image Orhan  ( 2016-03-10 00:43:14 -0600 )edit

Yes, that's what I did but it does not work. Perhaps there is a problem? Because it says: Could not find a connection between 'map' and 'base_link' because they are not part of the same tree.Tf has two or more unconnected trees.. canTransform returned after 0.105566 timeout was 0.1.

papaclaudia gravatar image papaclaudia  ( 2016-03-10 01:41:48 -0600 )edit

You should ask a new Question for this. I looked up, There is your question exists. I am writing there. And In RViz, in the global options, set mixed frame to /base_link if it is map.

Orhan gravatar image Orhan  ( 2016-03-10 03:04:28 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-03-09 05:50:53 -0600

Seen: 646 times

Last updated: Mar 10 '16