0
$\begingroup$

Rosanswers logo

I wrote a node arduino that publish rpm and subscribe to cmd_vel with ros serial, and i can control my robot with teleop_twist_keyboard. and also i create a package with hector slam that visualise a map. now i want to add odometry to hector_slam for autonomous mapping . what can i do please? this is the file.launch of hector slam:

<?xml version="1.0"?>

<launch>
  <param name="pub_map_odom_transform" value="true"/> 
  <param name="map_frame" value="map"/> 
  <param name="base_frame" value="base_frame"/> 
  <param name="odom_frame" value="base_frame"/>
  <include file="$(find openni2_launch)/launch/openni2.launch"/>
  
  <node pkg="depthimage_to_laserscan" type="depthimage_to_laserscan" name="depthimage_2_laserscan">
    <remap from="image" to="/camera/depth/image_raw"/>
  </node>
  <node pkg="tf" type="static_transform_publisher" name="map_2_base_footprint" args="0 0 0 0 0 0 /map /base_footprint 100"/> 
  <node pkg="tf" type="static_transform_publisher" name="base_footprint_2_base_link" args="0 0 0 0 0 0 /base_footprint /base_link 100"/> 
  <node pkg="tf" type="static_transform_publisher" name="base_link_2_base_stabilized_link" args="0 0 0 0 0 0 /base_link /base_stabilized 100"/> 
  <node pkg="tf" type="static_transform_publisher" name="base_stablized_2_base_frame" args="0 0 0 0 0 0 /base_stabilized /base_frame 100"/> 
  <node pkg="tf" type="static_transform_publisher" name="base_frame_2_laser_link" args="0 0 0 0 0 0 /base_frame /camera_link 100"/> 
  <node pkg="tf" type="static_transform_publisher" name="base_2_nav_link" args="0 0 0 0 0 0 /base_frame /nav 100"/>

  <node pkg="rviz" type="rviz" name="rviz" args="-d $(find hector_slam_example)/launch/rviz_cfg.rviz"/>

  <include file="$(find hector_slam_example)/launch/default_mapping.launch"/> 
  <include file="$(find hector_geotiff)/launch/geotiff_mapper.launch"/>

</launch>

Originally posted by Emilien on ROS Answers with karma: 167 on 2016-07-19

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I am also creating a robot for autonomous mapping. I used hector_slam with hector_navigation.

Hector_exploration_controller (which is part of the hector_navigation stack) will publish cmd_vel values you can use to explore the unknown area.

http://wiki.ros.org/hector_navigation

I do not believe you need odometry when using hector slam.

i launch my lidar, hector slam, hector exploration planner, and run the simple_exploration_controller and of course rosserial.


Originally posted by RoSPlebb with karma: 64 on 2016-07-19

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by Emilien on 2016-07-19:
i install hector navigation but how can i relate it with hector slam and odometry? i already create a node arduino with subscribe au cmd_vel and publish rpm, and i can control my robot with teleop_twist_keyboard. i don't know if i can use this

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.