AutonomyLab / create_robot

ROS driver for iRobot Create 1 and 2.
http://www.autonomylab.org/create_autonomy
BSD 3-Clause "New" or "Revised" License
198 stars 165 forks source link

Is there a way to connect several roombas at the same time? #63

Closed epsilon11101 closed 4 years ago

epsilon11101 commented 4 years ago

I'm trying to do it, but I don't know what the way is, I know that the issues are not for this, but I don't find an answer on the other hand

jacobperron commented 4 years ago

From one computer, you should be able to launch multiple instances of ca_driver for each robot. For example, after connecting the robots to your computer, you should be able to see each in the devices list:

$ ls /dev/ttyUSB*
/dev/ttyUSB0
/dev/ttyUSB1

Once you've identified the device paths, you can create a custom parameter file for each robot, changing the dev parameter (see the default.yaml for an example). You should probably update the base_frame and odom_frame values for each robot so that they don't clash. Then you can load the parameters in a launch file (see example launch file.

You should also namespace the driver node for each robot so they do not clash. You can do this by adding a ns attribute to the node tag in your launch file.

epsilon11101 commented 4 years ago

thanks for the fast response :) ,It worked perfectly :)! , what's a ns attribute? ,and Another question, what would be the way to read the odometry of each roomba independently?

epsilon11101 commented 4 years ago

i solve it with ns! (namespace) thanks a lot! <3

jacobperron commented 4 years ago

happy to help!