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

abckwok123's profile - activity

2018-10-19 06:30:38 -0500 received badge  Famous Question (source)
2017-09-26 06:14:40 -0500 received badge  Notable Question (source)
2017-09-26 06:14:40 -0500 received badge  Popular Question (source)
2017-07-02 01:45:21 -0500 received badge  Famous Question (source)
2017-03-28 06:43:37 -0500 received badge  Editor (source)
2017-03-28 05:27:42 -0500 asked a question Visualizing a dynamic map through nav2djs with gmapping problem

I want to visualizing the slam map through nav2djs but the canvas turns black when I start to navigate the robot.

    // Connect to ROS.
var ros = new ROSLIB.Ros({
  url : 'ws://localhost:8080'
});

// Create the main viewer.
var viewer = new ROS2D.Viewer({
  divID : 'nav',
  width : 600,
  height : 600
});

// Setup the nav client.
var nav = NAV2D.OccupancyGridClientNav({
  ros : ros,   
  rootObject : viewer.scene,
  viewer : viewer,
  topic : '/gmapping/map',   
  continuous: true
});

Thanks so much

2016-11-14 06:11:06 -0500 received badge  Notable Question (source)
2016-10-13 05:35:37 -0500 received badge  Popular Question (source)
2016-09-30 05:25:18 -0500 asked a question Hector Slam creating map problem

I am a new user recently start to use ROS and want to build a robot that can automatically create a map. Finally, I find Hector Slam that helps me to solve the problem. I want to get familiar with the Hector Slam so I try to use STDR simulator with hector slam to simulate the map building process. I record the Laser scan(robot0_laser_0), tf into bag file while using the STDR simulator to control the robot. But when I launch Hector Slam with my launch file, the map is not created correctly.

I want to ask how to fix the launch file error so that i can use Hector Slam to build a map with the data from STDR simulator. Thanks so much for help. :)

The bag file:

types: sensor_msgs/LaserScan [90c7ef2dc6895d81024acba2ac42f369] tf2_msgs/TFMessage [94810edda583a504dfda3829e70d7eec] topics: /robot0/laser_0 2805 msgs : sensor_msgs/LaserScan /tf 25232 msgs : tf2_msgs/TFMessage (3 connections)

Here the error when running

lookupTransform robot0 to robot0_laser_0 timed out. Could not transform laser scan into base_frame.

The launch file:

<?xml version="1.0"?>
<launch>
     <arg name="geotiff_map_file_path" default="$(find hector_geotiff)/maps"/>
     <param name="/use_sim_time" value="true"/>
     <node pkg="rviz" type="rviz" name="rviz" args="-d $(find hector_slam_launch)/rviz_cfg/mapping_demo.rviz"/>

     <arg name="tf_map_scanmatch_transform_frame_name" default="scanmatcher_frame"/>
     <arg name="base_frame" default="robot0"/>
     <arg name="odom_frame" default="nav"/>
     <arg name="pub_map_odom_transform" default="true"/>
     <arg name="scan_subscriber_queue_size" default="5"/>
     <arg name="scan_topic" default="robot0/laser_0"/>
     <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="true"/>
    <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.4"/>
    <param name="map_update_angle_thresh" value="0.06" />
    <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)"/>
    <param name="tf_map_scanmatch_transform_frame_name" value="$(arg tf_map_scanmatch_transform_frame_name)"/>
</node>
<include file="$(find hector_geotiff)/launch/geotiff_mapper.launch">
      <arg name="trajectory_source_frame_name" value="scanmatcher_frame"/>
      <arg name="map_file_path" value="$(arg geotiff_map_file_path)"/>
      <node pkg="tf" type="static_transform_publisher" name="baselink_laser" args="0 0 0 0 0 0/base_link/laser 10"/>
      <node pkg="hector_mapping" name="hector_mapping" type="hector_mapping" output="screen"/>
 </include>
 </launch>