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

ROSYHB's profile - activity

2018-03-08 17:54:19 -0500 received badge  Notable Question (source)
2017-05-30 04:39:03 -0500 received badge  Popular Question (source)
2017-05-18 06:10:22 -0500 received badge  Famous Question (source)
2017-02-20 10:54:30 -0500 received badge  Notable Question (source)
2017-02-19 22:00:10 -0500 received badge  Scholar (source)
2017-02-19 21:31:35 -0500 asked a question nav2d Exploration finished in TX1

Hello,everyone I encountered a problem when I used nav2d in my navdia TX1. After apt-get install ros-indigo-nav2d , I roslaunched tutorial3.launch ,rosservice call /StartMapping 3,rosservice call /StartExploration 2.When called StartMapping,the robot run while the map was mapping.But,when called StartExploration,nothing happened. For finding the reason,I installed it from source and add some log code. I found the cellcount in NearesFrontierPlanner.cpp is much bigger than 50. But I run nav2d well in my computer,are there codes depend on hardware?

2017-02-19 19:54:49 -0500 received badge  Popular Question (source)
2017-02-18 00:38:38 -0500 commented answer nav2d Exploration failed with hectormapping

Thanks for your reply.I've found that navigator can get map via a service call after I change the map_service to "dynamic_map" in ros.yaml.

2017-02-13 03:21:55 -0500 asked a question nav2d Exploration failed with hectormapping

Hello,everyone In the tutorial3.launch, I remove the mapper node and use hectormapping instead. after roslaunch tutorial3.launch, in a new terminal,type "rosservice call /StartMapping 3" and enter,the robot can run.Then,I tyep ""rosservice call /StartExploration 2 and enter,the terminal,which roslaunch tutorial3.launch,shows some message: Is the robot out of the map? Exploration failed, could not get current position.

I add some log in the code,finding that mCurrentMap.getIndex(current_x, current_y, i)=false,mHasNewMap=false,getMap()=false.

here is my launch files,

tutorial3.launch: <launch> <rosparam file="$(find nav2d_tutorials)/param/ros.yaml"/>

<!-- Start Stage simulator with a given environment -->

<node name="Stage" pkg="stage_ros" type="stageros" args="$(find nav2d_tutorials)/world/tutorial.world"> </node>

<!-- Start the Operator to control the simulated robot -->
<node name="Operator" pkg="nav2d_operator" type="operator" >
    <remap from="scan" to="base_scan"/>
    <rosparam file="$(find nav2d_tutorials)/param/operator.yaml"/>
    <rosparam file="$(find nav2d_tutorials)/param/costmap.yaml" ns="local_map" />
</node>



<node pkg="hector_mapping" type="hector_mapping" name="hector_height_mapping" output="screen">
  <param name="scan_topic" value="base_scan" />
<param name="base_frame" value="base_link" />
<param name="odom_frame" value="odom" />
<param name="map_frame" value="map"/>
<param name="laser_frame" value="base_laser_link"/>
<param name="output_timing" value="false"/>

<param name="map_pub_period" value="0.5"/>
<param name="update_factor_free" value="0.45"/>

<param name="map_update_distance_thresh" value="0.02"/>
<param name="map_update_angle_thresh" value="0.1"/>

<param name="map_resolution" value="0.05"/>
<param name="map_size" value="1024"/>
<param name="map_start_x" value="0.5"/>
<param name="map_start_y" value="0.5"/>
<remap from="map" to="map"/>

</node>

<!-- Start the Navigator to move the robot autonomously -->
<node name="Navigator" pkg="nav2d_navigator" type="navigator">
    <rosparam file="$(find nav2d_tutorials)/param/navigator.yaml"/>
</node>

<node name="GetMap" pkg="nav2d_navigator" type="get_map_client" />
<node name="Explore" pkg="nav2d_navigator" type="explore_client" />
<node name="SetGoal" pkg="nav2d_navigator" type="set_goal_client" />


<!-- Pioneer model for fancy visualization -->
<!-- Comment this out if you do not have the package 'p2os' available! -->
<include file="$(find p2os_urdf)/launch/pioneer3at_urdf.launch" />
<node name="front_left_wheel" pkg="tf" type="static_transform_publisher" args="0 0 0 0 0 0 p3at_front_left_hub p3at_front_left_wheel 100" />
<node name="front_right_wheel" pkg="tf" type="static_transform_publisher" args="0 0 0 0 0 0 p3at_front_right_hub p3at_front_right_wheel 100" />
<node name="back_left_wheel" pkg="tf" type="static_transform_publisher" args="0 0 0 0 0 0 p3at_back_left_hub p3at_back_left_wheel 100" />
<node name="back_right_wheel" pkg="tf" type="static_transform_publisher" args="0 0 0 0 0 0 p3at_back_right_hub p3at_back_right_wheel 100" />

<!-- RVIZ to view the visualization -->
<node name="RVIZ" pkg="rviz" type="rviz" args=" -d $(find nav2d_tutorials)/param/tutorial3.rviz" />

</launch>

Thank you!!