nav2d navigator for a real map
Hi to all,
I sucessfully implemented nav2d package on my real robot and managed to make accurate maps. Now I'm looking for navigating through it via tutorial2 from nav2d/tutorials (give him a goal after positioning my robot on the map and wait it reaches there). I know it can be used for simulated maps using stage_ros, but I want to make this for maps I have.
Assuming I have everything OK for nav2d, I'd like to you explain me how do I communicate mapserver with nav2d and make a call for requesting the map I have, just like amcl as a service call (navmsgs/GetMap) or something similar. Like movebase, amcl and mapserver for navigation to set goals.
Here is my tutorial2.launch file.
<launch>
<!-- Some general parameters -->
<param name="use_sim_time" value="false" />
<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"> -->
<!-- <param name="base_watchdog_timeout" value="0" /> -->
<!-- </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>
<!-- Load the environment map in the map_server -->
<node name="map_server" pkg="map_server" type="map_server" args="$(find catkin_ws)/mapihave.yaml" />
<!-- Start particle filter to track the robot's position -->
<node name="SelfLocalizer" pkg="nav2d_localizer" type="localizer">
<!-- <remap from="scan" to="base_scan"/> -->
<param name="min_particles" type="int" value="5000"/>
<param name="max_particles" type="int" value="20000"/>
</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 pkg="tf" type="static_transform_publisher" name="map_odom" args="0 0 0 0 0 0 \/map odom 100" />
<node name="SetGoal" pkg="nav2d_navigator" type="set_goal_client" />
<!-- Start the joystick-driver and remote-controller for operation-->
<!-- <node name="Joystick" pkg="joy" type="joy_node" /> -->
<node name="Remote" pkg="nav2d_remote" type="remote_joy" />
<!-- RVIZ to view the visualization -->
<!-- <node name="RVIZ" pkg="rviz" type="rviz" args=" -d $(find nav2d_tutorials)/param/tutorial2.rviz" /> -->
I had to make a static transform for map_server since it needs to retrieve information from map frame. But after launching rviz it doesn't load my map.
Thank you
Asked by michal on 2018-03-26 00:37:30 UTC
Comments