Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

nav2d autonomous exploration

Hi there.

First of all thanks a lot for helping me and reading this post. I am trying to use nav2d pkg in my amigobot robot in stdr simulator.

What I need is to do the same that in tutorial3 but in my robot. I add every lines that in tutorial there are in my .launch. When I launch my .launch it does not give me an error but when I try: rosservice call /StartMapping 3 rosservice call /StartExploration 2

The robot does not move. Where I can put my cmd_vel and laser topic?

And when I do rosservice ... 3 or 2 it says me that the argument expected is [].

How can I setup nav2d tutorial 3 to my robot?

Thanks a lot

nav2d autonomous exploration

Hi there.

First of all thanks a lot for helping me and reading this post. I am trying to use nav2d pkg in my amigobot robot in stdr simulator.

What I need is to do the same that in tutorial3 but in my robot. I add every lines that in tutorial there are in my .launch. When I launch my .launch it does not give me an error but when I try: rosservice call /StartMapping 3 rosservice call /StartExploration 2

The robot does not move. Where I can put my cmd_vel and laser topic?

And when I do rosservice ... 3 or 2 it says me that the argument expected is [].

How can I setup nav2d tutorial 3 to my robot?

Thanks a lot

EDIT1: I have just remap cmd_vel to my topic robot0/cmd_vel and scan to my topic /robot0_laser1. It launch weel but when I do: rosservice call /StartMapping it says me:
success: True message: Send GetFirstMapGoal to Navigator.

And now when I do: rosservice call /StartExploration, it says me: success: True message: Send ExploreGoal to Navigator.

And robot does not move and it says me the next errors:

Thanks for helping me

nav2d autonomous exploration

Hi there.

First of all thanks a lot for helping me and reading this post. I am trying to use nav2d pkg in my amigobot robot in stdr simulator.

What I need is to do the same that in tutorial3 but in my robot. I add every lines that in tutorial there are in my .launch. When I launch my .launch it does not give me an error but when I try: rosservice call /StartMapping 3 rosservice call /StartExploration 2

The robot does not move. Where I can put my cmd_vel and laser topic?

And when I do rosservice ... 3 or 2 it says me that the argument expected is [].

How can I setup nav2d tutorial 3 to my robot?

Thanks a lot

EDIT1: I have just remap cmd_vel to my topic robot0/cmd_vel and scan to my topic /robot0_laser1. It launch weel but when I do: rosservice call /StartMapping it says me:
success: True message: Send GetFirstMapGoal to Navigator.

And now when I do: rosservice call /StartExploration, it says me: success: True message: Send ExploreGoal to Navigator.

And robot does not move and it says me the next errors:

[ERROR] : Could not get robot position: "base_link" passed to lookupTransform argument source_frame does not exist. [ERROR] : Exploration failed, could not get current position.

Thanks for helping me

nav2d autonomous exploration

Hi there.

First of all thanks a lot for helping me and reading this post. I am trying to use nav2d pkg in my amigobot robot in stdr simulator.

What I need is to do the same that in tutorial3 but in my robot. I add every lines that in tutorial there are in my .launch. When I launch my .launch it does not give me an error but when I try: rosservice call /StartMapping 3 rosservice call /StartExploration 2

The robot does not move. Where I can put my cmd_vel and laser topic?

And when I do rosservice ... 3 or 2 it says me that the argument expected is [].

How can I setup nav2d tutorial 3 to my robot?

Thanks a lot

EDIT1: I have just remap cmd_vel to my topic robot0/cmd_vel and scan to my topic /robot0_laser1. It launch weel but when I do: rosservice call /StartMapping it says me:
success: True message: Send GetFirstMapGoal to Navigator.

And now when I do: rosservice call /StartExploration, it says me: success: True message: Send ExploreGoal to Navigator.

And robot does not move and it says me the next errors:

[ERROR] : Could not get robot position: "base_link" passed to lookupTransform argument source_frame does not exist. [ERROR] : Exploration failed, could not get current position.

Thanks for helping me

EDIT 2:

I have just fixed that error. Now the error is the next when I call rosservice StartExploration:

[ERROR] Exploration failed, could not get current position.

EDIT 3: Now it does not give me an error but robot does not move when I call StartExploration....

nav2d autonomous exploration

Hi there.

First of all thanks a lot for helping me and reading this post. I am trying to use nav2d pkg in my amigobot robot in stdr simulator.

What I need is to do the same that in tutorial3 but in my robot. I add every lines that in tutorial there are in my .launch. When I launch my .launch it does not give me an error but when I try: rosservice call /StartMapping 3 rosservice call /StartExploration 2

The robot does not move. Where I can put my cmd_vel and laser topic?

And when I do rosservice ... 3 or 2 it says me that the argument expected is [].

How can I setup nav2d tutorial 3 to my robot?

Thanks a lot

EDIT1: I have just remap cmd_vel to my topic robot0/cmd_vel and scan to my topic /robot0_laser1. It launch weel but when I do: rosservice call /StartMapping it says me:
success: True message: Send GetFirstMapGoal to Navigator.

And now when I do: rosservice call /StartExploration, it says me: success: True message: Send ExploreGoal to Navigator.

And robot does not move and it says me the next errors:

[ERROR] : Could not get robot position: "base_link" passed to lookupTransform argument source_frame does not exist. [ERROR] : Exploration failed, could not get current position.

Thanks for helping me

EDIT 2:

I have just fixed that error. Now the error is the next when I call rosservice StartExploration:

[ERROR] Exploration failed, could not get current position.

EDIT 3: Now it does not give me an error but robot does not move when I call StartExploration....

EDIT 4:

This is my .launch,

<launch>

<include file="$(find stdr_robot)/launch/robot_manager.launch" />

<node type="stdr_server_node" pkg="stdr_server" name="stdr_server" output="screen" args="$(find practica_final)/resources/map/map_final.yaml">
</node>

<node pkg="tf" type="static_transform_publisher" name="world2map" args="0 0 0 0 0 0  world map 100" >
</node>

<node name="$(anon stdr_gui_node)" pkg="stdr_gui" type="stdr_gui_node">
</node>

<node pkg="stdr_robot" type="robot_handler" name="$(anon robot_spawn)" args="add $(find practica_final)/resources/robot/amigobot_rfid.xml 3.5 6.5 0" >
</node>

<node pkg="practica_final" type="rfid_loader" name="rfid_loader" />

<node pkg="practica_final" type="local_odom" name="local_odom" >
<remap from="tf" to="tf_practica_final"/>
<!-- <param name="error_x" value="0.0"/>
<param name="error_y" value="0.0"/>
<param name="error_a" value="0.0"/> -->
</node>

<node pkg="practica_final" type="map_evaluation" name="map_evaluation" />

<node name="tf_filter" pkg="practica_final" type="tf_repub">
<rosparam param="polling_frequency">100.0</rosparam>
    <rosparam param="frame_pairs">
    - source_frame: robot0_laser_1
      target_frame: robot0
    - source_frame: robot0_sonar_0
      target_frame: robot0
    - source_frame: robot0_sonar_1
      target_frame: robot0
    - source_frame: robot0_sonar_2
      target_frame: robot0
    - source_frame: robot0_sonar_3
      target_frame: robot0
    - source_frame: robot0_sonar_4
      target_frame: robot0
    - source_frame: robot0_sonar_5
      target_frame: robot0
    - source_frame: robot0_sonar_6
      target_frame: robot0
    - source_frame: robot0_sonar_7
      target_frame: robot0
    - source_frame: robot0_rfid_reader_0
      target_frame: robot0
    </rosparam>
<remap from="tf_changes" to="tf_practica_final" />
</node>

<node pkg="move_base" type="move_base" respawn="true" name="move_base" output="screen">

<rosparam file="$(find practica_4)/config/move_base_params.yaml" command="load"/>

<rosparam file="$(find practica_4)/config/base_local_planner_params.yaml" command="load"/>

<rosparam file="$(find practica_4)/config/global_planner_params.yaml" command="load"/>

<rosparam file="$(find practica_4)/config/local_costmap_params.yaml" command="load"/>

<rosparam file="$(find practica_4)/config/global_costmap_params.yaml" command="load"/> <remap from="odom" to="robot0/local_odom"/> <remap from="cmd_vel" to="robot0/cmd_vel"/> </node>

<node pkg="amcl" type="amcl" name="amcl" output="screen"> <remap from="scan" to="robot0/laser_1"/> </node>

<node pkg="gmapping" type="slam_gmapping" name="gmapping_thing" output="screen" &gt;="" <remap="" from="tf" to="tf_practica_final"/> <remap from="map" to="gmapping_map"/> <remap from="scan" to="robot0/laser_1"/> </node>

<node name="Mapper" pkg="nav2d_karto" type="mapper"> <remap from="scan" to="robot0/laser_1"/> <remap from="map" to="gmapping_map"/> <remap from="tf" to="tf_practica_final"/> <remap from="cmd_vel" to="robot0/cmd_vel"/> <rosparam file="$(find nav2d_tutorials)/param/mapper.yaml"/> </node>

<!-- Some general parameters -->
<param name="use_sim_time" value="false" />
<rosparam file="$(find nav2d_tutorials)/param/ros.yaml"/>



<!-- Start the Operator to control the simulated robot -->
<node name="Operator" pkg="nav2d_operator" type="operator" >
    <remap from="scan" to="robot0/laser_1"/>
    <remap from="cmd" to="robot0/cmd_vel"/>
        <remap from="tf" to="tf_practica_final"/>
<remap from="odom" to="robot0/local_odom"/>
    <rosparam file="$(find nav2d_tutorials)/param/operator.yaml"/>

<rosparam file="$(find practica_4)/config/global_costmap_params.yaml" ns="local_map"/> </node>

<!-- Start the Navigator to move the robot autonomously -->
<node name="Navigator" pkg="nav2d_navigator" type="navigator">
<remap from="tf" to="tf_practica_final"/>
<remap from="odom" to="robot0/local_odom"/>
    <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" />

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

</launch>

nav2d autonomous exploration

Hi there.

First of all thanks a lot for helping me and reading this post. I am trying to use nav2d pkg in my amigobot robot in stdr simulator.

What I need is to do the same that in tutorial3 but in my robot. I add every lines that in tutorial there are in my .launch. When I launch my .launch it does not give me an error but when I try: rosservice call /StartMapping 3 rosservice call /StartExploration 2

The robot does not move. Where I can put my cmd_vel and laser topic?

And when I do rosservice ... 3 or 2 it says me that the argument expected is [].

How can I setup nav2d tutorial 3 to my robot?

Thanks a lot

EDIT1: I have just remap cmd_vel to my topic robot0/cmd_vel and scan to my topic /robot0_laser1. It launch weel but when I do: rosservice call /StartMapping it says me:
success: True message: Send GetFirstMapGoal to Navigator.

And now when I do: rosservice call /StartExploration, it says me: success: True message: Send ExploreGoal to Navigator.

And robot does not move and it says me the next errors:

[ERROR] : Could not get robot position: "base_link" passed to lookupTransform argument source_frame does not exist. [ERROR] : Exploration failed, could not get current position.

Thanks for helping me

EDIT 2:

I have just fixed that error. Now the error is the next when I call rosservice StartExploration:

[ERROR] Exploration failed, could not get current position.

EDIT 3: Now it does not give me an error but robot does not move when I call StartExploration....

EDIT 4:

This is my .launch,

<launch>

<include file="$(find stdr_robot)/launch/robot_manager.launch" />

<node type="stdr_server_node" pkg="stdr_server" name="stdr_server" output="screen" args="$(find practica_final)/resources/map/map_final.yaml">
</node>

<node pkg="tf" type="static_transform_publisher" name="world2map" args="0 0 0 0 0 0  world map 100" >
</node>

<node name="$(anon stdr_gui_node)" pkg="stdr_gui" type="stdr_gui_node">
</node>

<node pkg="stdr_robot" type="robot_handler" name="$(anon robot_spawn)" args="add $(find practica_final)/resources/robot/amigobot_rfid.xml 3.5 6.5 0" >
</node>

<node pkg="practica_final" type="rfid_loader" name="rfid_loader" />

<node pkg="practica_final" type="local_odom" name="local_odom" >
<remap from="tf" to="tf_practica_final"/>
<!-- <param name="error_x" value="0.0"/>
<param name="error_y" value="0.0"/>
<param name="error_a" value="0.0"/> -->
</node>

<node pkg="practica_final" type="map_evaluation" name="map_evaluation" />

<node name="tf_filter" pkg="practica_final" type="tf_repub">
<rosparam param="polling_frequency">100.0</rosparam>
    <rosparam param="frame_pairs">
    - source_frame: robot0_laser_1
      target_frame: robot0
    - source_frame: robot0_sonar_0
      target_frame: robot0
    - source_frame: robot0_sonar_1
      target_frame: robot0
    - source_frame: robot0_sonar_2
      target_frame: robot0
    - source_frame: robot0_sonar_3
      target_frame: robot0
    - source_frame: robot0_sonar_4
      target_frame: robot0
    - source_frame: robot0_sonar_5
      target_frame: robot0
    - source_frame: robot0_sonar_6
      target_frame: robot0
    - source_frame: robot0_sonar_7
      target_frame: robot0
    - source_frame: robot0_rfid_reader_0
      target_frame: robot0
    </rosparam>
<remap from="tf_changes" to="tf_practica_final" />
</node>

<node pkg="move_base" type="move_base" respawn="true" name="move_base" output="screen">

<rosparam file="$(find practica_4)/config/move_base_params.yaml" command="load"/>

<rosparam file="$(find practica_4)/config/base_local_planner_params.yaml" command="load"/>

<rosparam file="$(find practica_4)/config/global_planner_params.yaml" command="load"/>

<rosparam file="$(find practica_4)/config/local_costmap_params.yaml" command="load"/>

<rosparam file="$(find practica_4)/config/global_costmap_params.yaml" command="load"/> <remap from="odom" to="robot0/local_odom"/> <remap from="cmd_vel" to="robot0/cmd_vel"/> </node>

<node pkg="amcl" type="amcl" name="amcl" output="screen"> <remap from="scan" to="robot0/laser_1"/> </node>

<node pkg="gmapping" type="slam_gmapping" name="gmapping_thing" output="screen" &gt;="" <remap="" from="tf" to="tf_practica_final"/> <remap from="map" to="gmapping_map"/> <remap from="scan" to="robot0/laser_1"/> </node>

<node name="Mapper" pkg="nav2d_karto" type="mapper"> <remap from="scan" to="robot0/laser_1"/> <remap from="map" to="gmapping_map"/> <remap from="tf" to="tf_practica_final"/> <remap from="cmd_vel" to="robot0/cmd_vel"/> <rosparam file="$(find nav2d_tutorials)/param/mapper.yaml"/> </node>

<!-- Some general parameters -->
<param name="use_sim_time" value="false" />
<rosparam file="$(find nav2d_tutorials)/param/ros.yaml"/>



<!-- Start the Operator to control the simulated robot -->
<node name="Operator" pkg="nav2d_operator" type="operator" >
    <remap from="scan" to="robot0/laser_1"/>
    <remap from="cmd" to="robot0/cmd_vel"/>
        <remap from="tf" to="tf_practica_final"/>
<remap from="odom" to="robot0/local_odom"/>
    <rosparam file="$(find nav2d_tutorials)/param/operator.yaml"/>

<rosparam file="$(find practica_4)/config/global_costmap_params.yaml" ns="local_map"/> </node>

<!-- Start the Navigator to move the robot autonomously -->
<node name="Navigator" pkg="nav2d_navigator" type="navigator">
<remap from="tf" to="tf_practica_final"/>
<remap from="odom" to="robot0/local_odom"/>
    <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" />

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

</launch>

EDIT 4:

I have just removed gmapping and move base. And now it does not give my any warning but robot does not move when I do rosservice call /StartExploration (bofore to do that I do rosservice call /StartMapping).

Now my .launch is this:

<launch>

<include file="$(find stdr_robot)/launch/robot_manager.launch" />

<node type="stdr_server_node" pkg="stdr_server" name="stdr_server" output="screen" args="$(find practica_final)/resources/map/map_final.yaml">
</node>

<node pkg="tf" type="static_transform_publisher" name="world2map" args="0 0 0 0 0 0  world map 100" >
</node>

<node name="$(anon stdr_gui_node)" pkg="stdr_gui" type="stdr_gui_node">
</node>

<node pkg="stdr_robot" type="robot_handler" name="$(anon robot_spawn)" args="add $(find practica_final)/resources/robot/amigobot_rfid.xml 0.2 1 0" >
</node>

<node pkg="practica_final" type="rfid_loader" name="rfid_loader" />

<node pkg="practica_final" type="local_odom" name="local_odom" >
<remap from="tf" to="tf_practica_final"/>
<!-- <param name="error_x" value="0.0"/>
<param name="error_y" value="0.0"/>
<param name="error_a" value="0.0"/> -->
</node>

<node pkg="practica_final" type="map_evaluation" name="map_evaluation" />

<node name="tf_filter" pkg="practica_final" type="tf_repub">
<rosparam param="polling_frequency">100.0</rosparam>
    <rosparam param="frame_pairs">
    - source_frame: robot0_laser_1
      target_frame: robot0
    - source_frame: robot0_sonar_0
      target_frame: robot0
    - source_frame: robot0_sonar_1
      target_frame: robot0
    - source_frame: robot0_sonar_2
      target_frame: robot0
    - source_frame: robot0_sonar_3
      target_frame: robot0
    - source_frame: robot0_sonar_4
      target_frame: robot0
    - source_frame: robot0_sonar_5
      target_frame: robot0
    - source_frame: robot0_sonar_6
      target_frame: robot0
    - source_frame: robot0_sonar_7
      target_frame: robot0
    - source_frame: robot0_rfid_reader_0
      target_frame: robot0
    </rosparam>
<remap from="tf_changes" to="tf_practica_final" />
</node>

<node pkg="amcl" type="amcl" name="amcl" output="screen"> <remap from="scan" to="robot0/laser_1"/> </node>

<node name="Mapper" pkg="nav2d_karto" type="mapper"> <remap from="scan" to="robot0/laser_1"/> <remap from="tf" to="tf_practica_final"/> <remap from="odom" to="robot0/local_odom"/> <remap from="cmd_vel" to="robot0/cmd_vel"/> <rosparam file="$(find nav2d_tutorials)/param/mapper.yaml"/> </node>

<!-- Some general parameters -->
<param name="use_sim_time" value="false" />
<rosparam file="$(find nav2d_tutorials)/param/ros.yaml"/>



<!-- Start the Operator to control the simulated robot -->
<node name="Operator" pkg="nav2d_operator" type="operator" >
    <remap from="scan" to="robot0/laser_1"/>
    <remap from="cmd_vel" to="robot0/cmd_vel"/>
        <remap from="tf" to="tf_practica_final"/> 
<remap from="odom" to="robot0/local_odom"/>
    <rosparam file="$(find nav2d_tutorials)/param/operator.yaml"/>

<rosparam file="$(find practica_4)/config/global_costmap_params.yaml" ns="local_map"/> </node>

<!-- Start the Navigator to move the robot autonomously -->
<node name="Navigator" pkg="nav2d_navigator" type="navigator">
 <remap from="tf" to="tf_practica_final"/>
<remap from="odom" to="robot0/local_odom"/>
    <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" />

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

</launch>

Have I to remap any topic or something¿¿ Thanks a lot, it makes me crazy...

nav2d autonomous exploration

Hi there.

First of all thanks a lot for helping me and reading this post. I am trying to use nav2d pkg in my amigobot robot in stdr simulator.

What I need is to do the same that in tutorial3 but in my robot. I add every lines that in tutorial there are in my .launch. When I launch my .launch it does not give me an error but when I try: rosservice call /StartMapping 3 rosservice call /StartExploration 2

The robot does not move. Where I can put my cmd_vel and laser topic?

And when I do rosservice ... 3 or 2 it says me that the argument expected is [].

How can I setup nav2d tutorial 3 to my robot?

Thanks a lot

EDIT1: I have just remap cmd_vel to my topic robot0/cmd_vel and scan to my topic /robot0_laser1. It launch weel but when I do: rosservice call /StartMapping it says me:
success: True message: Send GetFirstMapGoal to Navigator.

And now when I do: rosservice call /StartExploration, it says me: success: True message: Send ExploreGoal to Navigator.

And robot does not move and it says me the next errors:

[ERROR] : Could not get robot position: "base_link" passed to lookupTransform argument source_frame does not exist. [ERROR] : Exploration failed, could not get current position.

Thanks for helping me

EDIT 2:

I have just fixed that error. Now the error is the next when I call rosservice StartExploration:

[ERROR] Exploration failed, could not get current position.

EDIT 3: Now it does not give me an error but robot does not move when I call StartExploration....

EDIT 4:

This is my .launch,

<launch>

<include file="$(find stdr_robot)/launch/robot_manager.launch" />

<node type="stdr_server_node" pkg="stdr_server" name="stdr_server" output="screen" args="$(find practica_final)/resources/map/map_final.yaml">
</node>

<node pkg="tf" type="static_transform_publisher" name="world2map" args="0 0 0 0 0 0  world map 100" >
</node>

<node name="$(anon stdr_gui_node)" pkg="stdr_gui" type="stdr_gui_node">
</node>

<node pkg="stdr_robot" type="robot_handler" name="$(anon robot_spawn)" args="add $(find practica_final)/resources/robot/amigobot_rfid.xml 3.5 6.5 0" >
</node>

<node pkg="practica_final" type="rfid_loader" name="rfid_loader" />

<node pkg="practica_final" type="local_odom" name="local_odom" >
<remap from="tf" to="tf_practica_final"/>
<!-- <param name="error_x" value="0.0"/>
<param name="error_y" value="0.0"/>
<param name="error_a" value="0.0"/> -->
</node>

<node pkg="practica_final" type="map_evaluation" name="map_evaluation" />

<node name="tf_filter" pkg="practica_final" type="tf_repub">
<rosparam param="polling_frequency">100.0</rosparam>
    <rosparam param="frame_pairs">
    - source_frame: robot0_laser_1
      target_frame: robot0
    - source_frame: robot0_sonar_0
      target_frame: robot0
    - source_frame: robot0_sonar_1
      target_frame: robot0
    - source_frame: robot0_sonar_2
      target_frame: robot0
    - source_frame: robot0_sonar_3
      target_frame: robot0
    - source_frame: robot0_sonar_4
      target_frame: robot0
    - source_frame: robot0_sonar_5
      target_frame: robot0
    - source_frame: robot0_sonar_6
      target_frame: robot0
    - source_frame: robot0_sonar_7
      target_frame: robot0
    - source_frame: robot0_rfid_reader_0
      target_frame: robot0
    </rosparam>
<remap from="tf_changes" to="tf_practica_final" />
</node>

<node pkg="move_base" type="move_base" respawn="true" name="move_base" output="screen">

<rosparam file="$(find practica_4)/config/move_base_params.yaml" command="load"/>

<rosparam file="$(find practica_4)/config/base_local_planner_params.yaml" command="load"/>

<rosparam file="$(find practica_4)/config/global_planner_params.yaml" command="load"/>

<rosparam file="$(find practica_4)/config/local_costmap_params.yaml" command="load"/>

<rosparam file="$(find practica_4)/config/global_costmap_params.yaml" command="load"/> <remap from="odom" to="robot0/local_odom"/> <remap from="cmd_vel" to="robot0/cmd_vel"/> </node>

<node pkg="amcl" type="amcl" name="amcl" output="screen"> <remap from="scan" to="robot0/laser_1"/> </node>

<node pkg="gmapping" type="slam_gmapping" name="gmapping_thing" output="screen" &gt;="" <remap="" from="tf" to="tf_practica_final"/> <remap from="map" to="gmapping_map"/> <remap from="scan" to="robot0/laser_1"/> </node>

<node name="Mapper" pkg="nav2d_karto" type="mapper"> <remap from="scan" to="robot0/laser_1"/> <remap from="map" to="gmapping_map"/> <remap from="tf" to="tf_practica_final"/> <remap from="cmd_vel" to="robot0/cmd_vel"/> <rosparam file="$(find nav2d_tutorials)/param/mapper.yaml"/> </node>

<!-- Some general parameters -->
<param name="use_sim_time" value="false" />
<rosparam file="$(find nav2d_tutorials)/param/ros.yaml"/>



<!-- Start the Operator to control the simulated robot -->
<node name="Operator" pkg="nav2d_operator" type="operator" >
    <remap from="scan" to="robot0/laser_1"/>
    <remap from="cmd" to="robot0/cmd_vel"/>
        <remap from="tf" to="tf_practica_final"/>
<remap from="odom" to="robot0/local_odom"/>
    <rosparam file="$(find nav2d_tutorials)/param/operator.yaml"/>

<rosparam file="$(find practica_4)/config/global_costmap_params.yaml" ns="local_map"/> </node>

<!-- Start the Navigator to move the robot autonomously -->
<node name="Navigator" pkg="nav2d_navigator" type="navigator">
<remap from="tf" to="tf_practica_final"/>
<remap from="odom" to="robot0/local_odom"/>
    <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" />

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

</launch>

EDIT 4:

I have just removed gmapping and move base. And now it does not give my any warning but robot does not move when I do rosservice call /StartExploration (bofore to do that I do rosservice call /StartMapping).

Now my .launch is this:

<launch>

<include file="$(find stdr_robot)/launch/robot_manager.launch" />

<node type="stdr_server_node" pkg="stdr_server" name="stdr_server" output="screen" args="$(find practica_final)/resources/map/map_final.yaml">
</node>

<node pkg="tf" type="static_transform_publisher" name="world2map" args="0 0 0 0 0 0  world map 100" >
</node>

<node name="$(anon stdr_gui_node)" pkg="stdr_gui" type="stdr_gui_node">
</node>

<node pkg="stdr_robot" type="robot_handler" name="$(anon robot_spawn)" args="add $(find practica_final)/resources/robot/amigobot_rfid.xml 0.2 1 0" >
</node>

<node pkg="practica_final" type="rfid_loader" name="rfid_loader" />

<node pkg="practica_final" type="local_odom" name="local_odom" >
<remap from="tf" to="tf_practica_final"/>
<!-- <param name="error_x" value="0.0"/>
<param name="error_y" value="0.0"/>
<param name="error_a" value="0.0"/> -->
</node>

<node pkg="practica_final" type="map_evaluation" name="map_evaluation" />

<node name="tf_filter" pkg="practica_final" type="tf_repub">
<rosparam param="polling_frequency">100.0</rosparam>
    <rosparam param="frame_pairs">
    - source_frame: robot0_laser_1
      target_frame: robot0
    - source_frame: robot0_sonar_0
      target_frame: robot0
    - source_frame: robot0_sonar_1
      target_frame: robot0
    - source_frame: robot0_sonar_2
      target_frame: robot0
    - source_frame: robot0_sonar_3
      target_frame: robot0
    - source_frame: robot0_sonar_4
      target_frame: robot0
    - source_frame: robot0_sonar_5
      target_frame: robot0
    - source_frame: robot0_sonar_6
      target_frame: robot0
    - source_frame: robot0_sonar_7
      target_frame: robot0
    - source_frame: robot0_rfid_reader_0
      target_frame: robot0
    </rosparam>
<remap from="tf_changes" to="tf_practica_final" />
</node>

<node pkg="amcl" type="amcl" name="amcl" output="screen"> <remap from="scan" to="robot0/laser_1"/> </node>

<node name="Mapper" pkg="nav2d_karto" type="mapper"> <remap from="scan" to="robot0/laser_1"/> <remap from="tf" to="tf_practica_final"/> <remap from="odom" to="robot0/local_odom"/> <remap from="cmd_vel" to="robot0/cmd_vel"/> <rosparam file="$(find nav2d_tutorials)/param/mapper.yaml"/> </node>

<!-- Some general parameters -->
<param name="use_sim_time" value="false" />
<rosparam file="$(find nav2d_tutorials)/param/ros.yaml"/>



<!-- Start the Operator to control the simulated robot -->
<node name="Operator" pkg="nav2d_operator" type="operator" >
    <remap from="scan" to="robot0/laser_1"/>
    <remap from="cmd_vel" to="robot0/cmd_vel"/>
        <remap from="tf" to="tf_practica_final"/> 
<remap from="odom" to="robot0/local_odom"/>
    <rosparam file="$(find nav2d_tutorials)/param/operator.yaml"/>

<rosparam file="$(find practica_4)/config/global_costmap_params.yaml" ns="local_map"/> </node>

<!-- Start the Navigator to move the robot autonomously -->
<node name="Navigator" pkg="nav2d_navigator" type="navigator">
 <remap from="tf" to="tf_practica_final"/>
<remap from="odom" to="robot0/local_odom"/>
    <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" />

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

</launch>

Have I to remap any topic or something¿¿ Thanks a lot, it makes me crazy...

EDIT 5:

When I publish to robot0/cmd_vel robot moves. I have just removed amcl node.

Here are my .launch, ros.yaml, costmap.yaml:

<launch>

<include file="$(find stdr_robot)/launch/robot_manager.launch" />

<node type="stdr_server_node" pkg="stdr_server" name="stdr_server" output="screen" args="$(find practica_final)/resources/map/map_final.yaml">
</node>

<node pkg="tf" type="static_transform_publisher" name="world2map" args="0 0 0 0 0 0  world map 100" >
</node>

<node name="$(anon stdr_gui_node)" pkg="stdr_gui" type="stdr_gui_node">
</node>

<node pkg="stdr_robot" type="robot_handler" name="$(anon robot_spawn)" args="add $(find practica_final)/resources/robot/amigobot_rfid.xml 0.2 1 0" >
</node>

<node pkg="practica_final" type="rfid_loader" name="rfid_loader" />

<node pkg="practica_final" type="local_odom" name="local_odom" >
<remap from="tf" to="tf_practica_final"/>
<!-- <param name="error_x" value="0.0"/>
<param name="error_y" value="0.0"/>
<param name="error_a" value="0.0"/> -->
</node>

<node pkg="practica_final" type="map_evaluation" name="map_evaluation" />

<node name="tf_filter" pkg="practica_final" type="tf_repub">
<rosparam param="polling_frequency">100.0</rosparam>
    <rosparam param="frame_pairs">
    - source_frame: robot0_laser_1
      target_frame: robot0
    - source_frame: robot0_sonar_0
      target_frame: robot0
    - source_frame: robot0_sonar_1
      target_frame: robot0
    - source_frame: robot0_sonar_2
      target_frame: robot0
    - source_frame: robot0_sonar_3
      target_frame: robot0
    - source_frame: robot0_sonar_4
      target_frame: robot0
    - source_frame: robot0_sonar_5
      target_frame: robot0
    - source_frame: robot0_sonar_6
      target_frame: robot0
    - source_frame: robot0_sonar_7
      target_frame: robot0
    - source_frame: robot0_rfid_reader_0
      target_frame: robot0
    </rosparam>
<remap from="tf_changes" to="tf_practica_final" />
</node>

<node name="Mapper" pkg="nav2d_karto" type="mapper"> <remap from="scan" to="robot0/laser_1"/> <remap from="tf" to="tf_practica_final"/> <remap from="cmd_vel" to="robot0/cmd_vel"/> <rosparam file="$(find nav2d_tutorials)/param/mapper.yaml"/> </node>

<!-- Some general parameters -->
<param name="use_sim_time" value="false" />
<rosparam file="$(find nav2d_tutorials)/param/ros.yaml"/>



<!-- Start the Operator to control the simulated robot -->
<node name="Operator" pkg="nav2d_operator" type="operator" >
    <remap from="scan" to="robot0/laser_1"/>
    <remap from="cmd_vel" to="robot0/cmd_vel"/>
        <remap from="tf" to="tf_practica_final"/> 
<remap from="odom" to="robot0/local_odom"/>
    <rosparam file="$(find nav2d_tutorials)/param/operator.yaml"/>

<rosparam file="$(find nav2d_tutorials)/param/costmap.yaml" ns="local_map"/> </node>

<!-- Start the Navigator to move the robot autonomously -->
<node name="Navigator" pkg="nav2d_navigator" type="navigator">
 <remap from="tf" to="tf_practica_final"/>
<remap from="odom" to="robot0/local_odom"/>
    <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" />

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

</launch>

Ros.yaml:

###########################################################

Defines topics services and frames for all modules

TF frames

laser_frame: robot0_laser1 robot_frame: robot0 odometry_frame: map_static offset_frame: offset map_frame: map

ROS topics

map_topic: map laser_topic: robot0/laser_1

ROS services

map_service: static_map

Costmap.yaml:

global_frame: odom

robot_base_frame: base_link update_frequency: 5.0 publish_frequency: 1.0

set if you want the voxel map published

publish_voxel_map: true

set to true if you want to initialize the costmap from a static map

static_map: false

begin - COMMENT these lines if you set static_map to true

rolling_window: true width: 6.0 height: 6.0 resolution: 0.05

end - COMMENT these lines if you set static_map to true

map_type: costmap track_unknown_space: true

transform_tolerance: 0.3 obstacle_range: 4.0 min_obstacle_height: 0.0 max_obstacle_height: 2.0 raytrace_range: 4.5

robot_radius: 0.15 inflation_radius: 0.75 cost_scaling_factor: 2.0 lethal_cost_threshold: 100 observation_sources: scan scan: {data_type: LaserScan, expected_update_rate: 0.4, observation_persistence: 0.0, marking: true, clearing: true, max_obstacle_height: 0.4, min_obstacle_height: 0.08}

If I put in odometry_frame: of ros.yaml "robot0/local_odom" which is a topic rviz give me an error in 'desired' and 'corrected' but when I do rosservice call StartMapping the robot turns around on itself, and with StartExplore it does not move. But if I put code that I show above robot do anything with StartMapping.

nav2d autonomous exploration

Hi there.

First of all thanks a lot for helping me and reading this post. I am trying to use nav2d pkg in my amigobot robot in stdr simulator.

What I need is to do the same that in tutorial3 but in my robot. I add every lines that in tutorial there are in my .launch. When I launch my .launch it does not give me an error but when I try: rosservice call /StartMapping 3 rosservice call /StartExploration 2

The robot does not move. Where I can put my cmd_vel and laser topic?

And when I do rosservice ... 3 or 2 it says me that the argument expected is [].

How can I setup nav2d tutorial 3 to my robot?

Thanks a lot

EDIT1: I have just remap cmd_vel to my topic robot0/cmd_vel and scan to my topic /robot0_laser1. It launch weel but when I do: rosservice call /StartMapping it says me:
success: True message: Send GetFirstMapGoal to Navigator.

And now when I do: rosservice call /StartExploration, it says me: success: True message: Send ExploreGoal to Navigator.

And robot does not move and it says me the next errors:

[ERROR] : Could not get robot position: "base_link" passed to lookupTransform argument source_frame does not exist. [ERROR] : Exploration failed, could not get current position.

Thanks for helping meEvery problems before fixed:

EDIT 2:6: Hi friends!! I have just fixed every problems with your help. So now my robot moves with StartMapping and with StartExplorer, but not really well...

I have just fixed think that error. Now the error is the next it do good StartMapping but when I call rosservice StartExploration:do StartExplorer, my robot explores just a few second and it gets stuck in a wall. I think that this problem is for some .yaml parameters.

[ERROR] Exploration failed, could not get current position.But I modify a lot of parameters to check if it does a good navigatiion and alwais it gets stuck. Which parameters have I to modify or what I can do???

EDIT 3: Now it does not give me an error but robot does not move when I call StartExploration....

EDIT 4:

This is my .launch,

<launch>

<include file="$(find stdr_robot)/launch/robot_manager.launch" />

<node type="stdr_server_node" pkg="stdr_server" name="stdr_server" output="screen" args="$(find practica_final)/resources/map/map_final.yaml">
</node>

<node pkg="tf" type="static_transform_publisher" name="world2map" args="0 0 0 0 0 0 Thanka  world map 100" >
</node>

<node name="$(anon stdr_gui_node)" pkg="stdr_gui" type="stdr_gui_node">
</node>

<node pkg="stdr_robot" type="robot_handler" name="$(anon robot_spawn)" args="add $(find practica_final)/resources/robot/amigobot_rfid.xml 3.5 6.5 0" >
</node>

<node pkg="practica_final" type="rfid_loader" name="rfid_loader" />

<node pkg="practica_final" type="local_odom" name="local_odom" >
<remap from="tf" to="tf_practica_final"/>
<!-- <param name="error_x" value="0.0"/>
<param name="error_y" value="0.0"/>
<param name="error_a" value="0.0"/> -->
</node>

<node pkg="practica_final" type="map_evaluation" name="map_evaluation" />

<node name="tf_filter" pkg="practica_final" type="tf_repub">
<rosparam param="polling_frequency">100.0</rosparam>
    <rosparam param="frame_pairs">
    - source_frame: robot0_laser_1
      target_frame: robot0
    - source_frame: robot0_sonar_0
      target_frame: robot0
    - source_frame: robot0_sonar_1
      target_frame: robot0
    - source_frame: robot0_sonar_2
      target_frame: robot0
    - source_frame: robot0_sonar_3
      target_frame: robot0
    - source_frame: robot0_sonar_4
      target_frame: robot0
    - source_frame: robot0_sonar_5
      target_frame: robot0
    - source_frame: robot0_sonar_6
      target_frame: robot0
    - source_frame: robot0_sonar_7
      target_frame: robot0
    - source_frame: robot0_rfid_reader_0
      target_frame: robot0
    </rosparam>
<remap from="tf_changes" to="tf_practica_final" />
</node>

<node pkg="move_base" type="move_base" respawn="true" name="move_base" output="screen">

<rosparam file="$(find practica_4)/config/move_base_params.yaml" command="load"/>

<rosparam file="$(find practica_4)/config/base_local_planner_params.yaml" command="load"/>

<rosparam file="$(find practica_4)/config/global_planner_params.yaml" command="load"/>

<rosparam file="$(find practica_4)/config/local_costmap_params.yaml" command="load"/>

<rosparam file="$(find practica_4)/config/global_costmap_params.yaml" command="load"/> <remap from="odom" to="robot0/local_odom"/> <remap from="cmd_vel" to="robot0/cmd_vel"/> </node>

<node pkg="amcl" type="amcl" name="amcl" output="screen"> <remap from="scan" to="robot0/laser_1"/> </node>

<node pkg="gmapping" type="slam_gmapping" name="gmapping_thing" output="screen" &gt;="" <remap="" from="tf" to="tf_practica_final"/> <remap from="map" to="gmapping_map"/> <remap from="scan" to="robot0/laser_1"/> </node>

<node name="Mapper" pkg="nav2d_karto" type="mapper"> <remap from="scan" to="robot0/laser_1"/> <remap from="map" to="gmapping_map"/> <remap from="tf" to="tf_practica_final"/> <remap from="cmd_vel" to="robot0/cmd_vel"/> <rosparam file="$(find nav2d_tutorials)/param/mapper.yaml"/> </node>

<!-- Some general parameters -->
<param name="use_sim_time" value="false" />
<rosparam file="$(find nav2d_tutorials)/param/ros.yaml"/>



<!-- Start the Operator to control the simulated robot -->
<node name="Operator" pkg="nav2d_operator" type="operator" >
    <remap from="scan" to="robot0/laser_1"/>
    <remap from="cmd" to="robot0/cmd_vel"/>
        <remap from="tf" to="tf_practica_final"/>
<remap from="odom" to="robot0/local_odom"/>
    <rosparam file="$(find nav2d_tutorials)/param/operator.yaml"/>

<rosparam file="$(find practica_4)/config/global_costmap_params.yaml" ns="local_map"/> </node>

<!-- Start the Navigator to move the robot autonomously -->
<node name="Navigator" pkg="nav2d_navigator" type="navigator">
<remap from="tf" to="tf_practica_final"/>
<remap from="odom" to="robot0/local_odom"/>
    <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" />

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

</launch>

EDIT 4:

I have just removed gmapping and move base. And now it does not give my any warning but robot does not move when I do rosservice call /StartExploration (bofore to do that I do rosservice call /StartMapping).

Now my .launch is this:

<launch>

<include file="$(find stdr_robot)/launch/robot_manager.launch" />

<node type="stdr_server_node" pkg="stdr_server" name="stdr_server" output="screen" args="$(find practica_final)/resources/map/map_final.yaml">
</node>

<node pkg="tf" type="static_transform_publisher" name="world2map" args="0 0 0 0 0 0  world map 100" >
</node>

<node name="$(anon stdr_gui_node)" pkg="stdr_gui" type="stdr_gui_node">
</node>

<node pkg="stdr_robot" type="robot_handler" name="$(anon robot_spawn)" args="add $(find practica_final)/resources/robot/amigobot_rfid.xml 0.2 1 0" >
</node>

<node pkg="practica_final" type="rfid_loader" name="rfid_loader" />

<node pkg="practica_final" type="local_odom" name="local_odom" >
<remap from="tf" to="tf_practica_final"/>
<!-- <param name="error_x" value="0.0"/>
<param name="error_y" value="0.0"/>
<param name="error_a" value="0.0"/> -->
</node>

<node pkg="practica_final" type="map_evaluation" name="map_evaluation" />

<node name="tf_filter" pkg="practica_final" type="tf_repub">
<rosparam param="polling_frequency">100.0</rosparam>
    <rosparam param="frame_pairs">
    - source_frame: robot0_laser_1
      target_frame: robot0
    - source_frame: robot0_sonar_0
      target_frame: robot0
    - source_frame: robot0_sonar_1
      target_frame: robot0
    - source_frame: robot0_sonar_2
      target_frame: robot0
    - source_frame: robot0_sonar_3
      target_frame: robot0
    - source_frame: robot0_sonar_4
      target_frame: robot0
    - source_frame: robot0_sonar_5
      target_frame: robot0
    - source_frame: robot0_sonar_6
      target_frame: robot0
    - source_frame: robot0_sonar_7
      target_frame: robot0
    - source_frame: robot0_rfid_reader_0
      target_frame: robot0
    </rosparam>
<remap from="tf_changes" to="tf_practica_final" />
</node>

<node pkg="amcl" type="amcl" name="amcl" output="screen"> <remap from="scan" to="robot0/laser_1"/> </node>

<node name="Mapper" pkg="nav2d_karto" type="mapper"> <remap from="scan" to="robot0/laser_1"/> <remap from="tf" to="tf_practica_final"/> <remap from="odom" to="robot0/local_odom"/> <remap from="cmd_vel" to="robot0/cmd_vel"/> <rosparam file="$(find nav2d_tutorials)/param/mapper.yaml"/> </node>

<!-- Some general parameters -->
<param name="use_sim_time" value="false" />
<rosparam file="$(find nav2d_tutorials)/param/ros.yaml"/>



<!-- Start the Operator to control the simulated robot -->
<node name="Operator" pkg="nav2d_operator" type="operator" >
    <remap from="scan" to="robot0/laser_1"/>
    <remap from="cmd_vel" to="robot0/cmd_vel"/>
        <remap from="tf" to="tf_practica_final"/> 
<remap from="odom" to="robot0/local_odom"/>
    <rosparam file="$(find nav2d_tutorials)/param/operator.yaml"/>

<rosparam file="$(find practica_4)/config/global_costmap_params.yaml" ns="local_map"/> </node>

<!-- Start the Navigator to move the robot autonomously -->
<node name="Navigator" pkg="nav2d_navigator" type="navigator">
 <remap from="tf" to="tf_practica_final"/>
<remap from="odom" to="robot0/local_odom"/>
    <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" />

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

</launch>

Have I to remap any topic or something¿¿ Thanks a lot, it makes me crazy...

EDIT 5:

When I publish to robot0/cmd_vel robot moves. I have just removed amcl node.

Here are my .launch, ros.yaml, costmap.yaml:

<launch>

<include file="$(find stdr_robot)/launch/robot_manager.launch" />

<node type="stdr_server_node" pkg="stdr_server" name="stdr_server" output="screen" args="$(find practica_final)/resources/map/map_final.yaml">
</node>

<node pkg="tf" type="static_transform_publisher" name="world2map" args="0 0 0 0 0 0  world map 100" >
</node>

<node name="$(anon stdr_gui_node)" pkg="stdr_gui" type="stdr_gui_node">
</node>

<node pkg="stdr_robot" type="robot_handler" name="$(anon robot_spawn)" args="add $(find practica_final)/resources/robot/amigobot_rfid.xml 0.2 1 0" >
</node>

<node pkg="practica_final" type="rfid_loader" name="rfid_loader" />

<node pkg="practica_final" type="local_odom" name="local_odom" >
<remap from="tf" to="tf_practica_final"/>
<!-- <param name="error_x" value="0.0"/>
<param name="error_y" value="0.0"/>
<param name="error_a" value="0.0"/> -->
</node>

<node pkg="practica_final" type="map_evaluation" name="map_evaluation" />

<node name="tf_filter" pkg="practica_final" type="tf_repub">
<rosparam param="polling_frequency">100.0</rosparam>
    <rosparam param="frame_pairs">
    - source_frame: robot0_laser_1
      target_frame: robot0
    - source_frame: robot0_sonar_0
      target_frame: robot0
    - source_frame: robot0_sonar_1
      target_frame: robot0
    - source_frame: robot0_sonar_2
      target_frame: robot0
    - source_frame: robot0_sonar_3
      target_frame: robot0
    - source_frame: robot0_sonar_4
      target_frame: robot0
    - source_frame: robot0_sonar_5
      target_frame: robot0
    - source_frame: robot0_sonar_6
      target_frame: robot0
    - source_frame: robot0_sonar_7
      target_frame: robot0
    - source_frame: robot0_rfid_reader_0
      target_frame: robot0
    </rosparam>
<remap from="tf_changes" to="tf_practica_final" />
</node>

<node name="Mapper" pkg="nav2d_karto" type="mapper"> <remap from="scan" to="robot0/laser_1"/> <remap from="tf" to="tf_practica_final"/> <remap from="cmd_vel" to="robot0/cmd_vel"/> <rosparam file="$(find nav2d_tutorials)/param/mapper.yaml"/> </node>

<!-- Some general parameters -->
<param name="use_sim_time" value="false" />
<rosparam file="$(find nav2d_tutorials)/param/ros.yaml"/>



<!-- Start the Operator to control the simulated robot -->
<node name="Operator" pkg="nav2d_operator" type="operator" >
    <remap from="scan" to="robot0/laser_1"/>
    <remap from="cmd_vel" to="robot0/cmd_vel"/>
        <remap from="tf" to="tf_practica_final"/> 
<remap from="odom" to="robot0/local_odom"/>
    <rosparam file="$(find nav2d_tutorials)/param/operator.yaml"/>

<rosparam file="$(find nav2d_tutorials)/param/costmap.yaml" ns="local_map"/> </node>

<!-- Start the Navigator to move the robot autonomously -->
<node name="Navigator" pkg="nav2d_navigator" type="navigator">
 <remap from="tf" to="tf_practica_final"/>
<remap from="odom" to="robot0/local_odom"/>
    <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" />

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

</launch>

Ros.yaml:

###########################################################

Defines topics services and frames for all modules

TF frames

laser_frame: robot0_laser1 robot_frame: robot0 odometry_frame: map_static offset_frame: offset map_frame: map

ROS topics

map_topic: map laser_topic: robot0/laser_1

ROS services

map_service: static_map

Costmap.yaml:

global_frame: odom

robot_base_frame: base_link update_frequency: 5.0 publish_frequency: 1.0

set if you want the voxel map published

publish_voxel_map: true

set to true if you want to initialize the costmap from a static map

static_map: false

begin - COMMENT these lines if you set static_map to true

rolling_window: true width: 6.0 height: 6.0 resolution: 0.05

end - COMMENT these lines if you set static_map to true

map_type: costmap track_unknown_space: true

transform_tolerance: 0.3 obstacle_range: 4.0 min_obstacle_height: 0.0 max_obstacle_height: 2.0 raytrace_range: 4.5

robot_radius: 0.15 inflation_radius: 0.75 cost_scaling_factor: 2.0 lethal_cost_threshold: 100 observation_sources: scan scan: {data_type: LaserScan, expected_update_rate: 0.4, observation_persistence: 0.0, marking: true, clearing: true, max_obstacle_height: 0.4, min_obstacle_height: 0.08}

If I put in odometry_frame: of ros.yaml "robot0/local_odom" which is a topic rviz give me an error in 'desired' and 'corrected' but when I do rosservice call StartMapping the robot turns around on itself, and with StartExplore it does not move. But if I put code that I show above robot do anything with StartMapping.lot!