move_base with remaped topics
Hello everybody!
I'm using ROS noetic to develop a little project. I'm trying to use movebase package for a turtlebot3. The package I'm using is: http://wiki.ros.org/movebase
So, in order to launch the simulation in Gazebo, I use: roslaunch turtlebot3gazebo turtlebot3world.launch
As I already have a general map (got it ussing gmapping and teleop), and I cloned turtlebot3navigation pkg in order to the launch files for movebase, so the next launch file I use is: roslaunch turtlebot3navigation turtlebot3navigation.launch
This launch file launches: -turtlebot3remote.launch -mapserver -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="odomframeid" value="$(arg robot_name)/odom"/>
param name="baseframeid" value="$(arg robotname)/basefootprint"/>
-In move_base:
remap from="movebase/goal" to="$(arg robotname)/move_base/goal"/>
remap from="movebase/cancel" to="$(arg robotname)/move_base/cancel"/>
remap from="movebase/feedback" to="$(arg robotname)/move_base/feedback"/>
remap from="movebase/status" to="$(arg robotname)/move_base/status"/>
remap from="movebase/result" to="$(arg robotname)/move_base/result"/>
remap from="movebasesimple/goal" to="$(arg robotname)/movebase_simple/goal"/>
remap from="cmdvel" to="$(arg robotname)/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:
/movebasesimple/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 movebase. I think they must be a lot of problems in the code, so I just want to know if someone has already used movebase remapped to a robot's name.
Thank you so much! (:
Asked by martinrosales on 2022-02-26 16:22:44 UTC
Comments