Hi, I need to simulate multiple turtlebots in gazebo and visualize them in rviz and finally I succeed to add two robots into gazebo and rviz according to [this](http://answers.ros.org/question/115396/problem-with-multiple-navigation-on-gazebo/) but there are a few problems.
1.if I teleop one of the robot, even just rotate in place, the turtlebot will drift.
I checked [this](http://answers.ros.org/question/188553/robot-drifting-in-rviz/) however when I look into the source file of gazebo_ros_kobuki.cpp(kobuki_gazebo_plugins) I find that this module is using the non-holonomic robot model. I am not sure what is the problem.
2.When I drive one robot toward the other and let these two robot collide, in the gazebo everything is ok but in rviz the moving robot just drive into the other one and pass through it, like the other one never exists. And also there is no output of bump cloud.
3.As you can see in the teleop launch file, I only publish velocity commands to one robot. But the actual result is that that turtlebot in gazebo works fine but in rviz both turtlebots react to the angular velocity. That means if I drive the robot, say robot1, linearly then only robot1 moves in rviz but when I sent angular velocity through keyboard then both robots will rotate in rviz.**[this one is solved by change sensor names]**
So I check the velocity topics related to both robots, it shows that only /robot1/command/velocity receives messages other velocity related topics have no message received. But still both robots rotate.
Here are related files:
Gazebo related files
Main launch file:
agents.launch.xml for multiple robots launch
agent.launch.xml for single robot launch
amcl.launch.xml for localization
Keyop file for key board operation.
rviz file
By the way I change the following lines in gazebo_ros_kobuki.cpp.
Line 141 joint_state_pub_ = nh_.advertise(node_name_ +"/joint_states", 1);
Line 198 odom_pub_ = nh_.advertise(node_name_ +"/odom", 1);
Line 386 joint_state_.header.frame_id = node_name_+"/base_link";
Line 397 odom_.header.frame_id = node_name_+"/odom";
Line 398 odom_.child_frame_id = node_name_+"/base_footprint";
Please help me with the problems thank you very much!!
[here](https://www.dropbox.com/s/2y0xxap3s22xq8j/frames.pdf?dl=0) is the tf frames
topics are [here](https://www.dropbox.com/s/qnfddreiyu1d29l/topics.txt?dl=0)
↧