move_base with remaped topics
Hello everybody!
I'm using ROS noetic to develop a little project. I'm trying to use move_base package for a turtlebot3. The package I'm using is: http://wiki.ros.org/move_base
So, in order to launch the simulation in Gazebo, I use: roslaunch turtlebot3_gazebo turtlebot3_world.launch
As I already have a general map (got it ussing gmapping and teleop), and I cloned turtlebot3_navigation pkg in order to the launch files for move_base, so the next launch file I use is: roslaunch turtlebot3_navigation turtlebot3_navigation.launch
This launch file launches: -turtlebot3_remote.launch -map_server -amcl.launch -move_base.launch -rviz
So the I can create a 2D Nav Goal in RVIZ, and the robot would plan a path and move to the desire point.
The problem now is that, as I may use many turtlebots form my project, each robot would have a different name and I would need to remap all the topics.
I already remapped all the topics and params I was capable to find, as:
-In map_server:
remap from="/map" to="$(arg robot_name)/map"/>
-In AMCL:
remap from="scan" to="$(arg robot_name)/scan"/
param name="odom_frame_id" value="$(arg robot_name)/odom"/>
param name="base_frame_id" value="$(arg robot_name)/base_footprint"/>
-In move_base:
remap from="move_base/goal" to="$(arg robot_name)/move_base/goal"/>
remap from="move_base/cancel" to="$(arg robot_name)/move_base/cancel"/>
remap from="move_base/feedback" to="$(arg robot_name)/move_base/feedback"/>
remap from="move_base/status" to="$(arg robot_name)/move_base/status"/>
remap from="move_base/result" to="$(arg robot_name)/move_base/result"/>
remap from="move_base_simple/goal" to="$(arg robot_name)/move_base_simple/goal"/>
remap from="cmd_vel" to="$(arg robot_name)/cmd_vel"/>
remap from="odom" to="$(arg robot_name)/odom"/>
remap from="scan" to="$(arg robot_name)/scan"/>
In the end, it doesn't work. The first problem I found is the map topic. So, in the case I don't use a robot name, I can see in RQT that the move_base model receives info from the topics:
/move_base_simple/goal
/map (from the map_server)
/scan
But when I try to put a name on the robot, there is created a topic called /robot1/map but it's not connected to move_base. I think they must be a lot of problems in the code, so I just want to know if someone has already used move_base remapped to a robot's name.
Thank you so much! (: