Spawning and controlling two different robots in Gazebo
Hi!
Currently there's an UR5 robot, which is working and doing it's stuff (with moveit).
My task is to have a robot that goes around in circles near the UR5 (so later the UR5 can do stuff with it). I already made a simple robot that can move around, go in circles, if I publish on a certain topic. It has it's own URDF, gazebo ros control, launch file etc. (let's call it simple robot)
And of course the UR5 has these too.
I tried launching both of these with a launch file, which of course didn't work. I saw all kind of tutorials about spawning the same robot multiple times, which isn't what I want. I want to spawn two different robots.
Spawning the complete UR5 and the simple robot model (without a controller, just the model) is easy, but when it comes to control the simple robot too (spawning a gazebo_ros_control, or somehow using the UR5's), that's where things get nasty. One of the problems (I think) is that both URDFs have a "<plugin name="ros_control" filename="libgazebo_ros_control.so">" part, and I think spawning 2 ros controllers won't really work. Deleting this plugin from the simple robot's URDF won't help, I can't control it (I can't remember, but I think even thought the .yaml is loaded, it can't find the controllers or something like that)
Maybe I have to make it global somehow...
The other problem is probably namespace. Making a correct namespace for the simple robot isn't hard, but for the UR5... I think that's a bit complex.
I tried making a merged URDF, so the simple robot is part of the UR5's system (so there won't be problem with namespaces and stuff), but the problem is that I need to connect the simple robot to the UR5.
Simple, there's a world link already for the UR5, I just connect the simple robot to the world with a floating joint... yeah, well it seems like floating is not supported, or I don't know, but when I start the program it says:
[ WARN] [1469109391.706616642]: Converting unknown joint type of joint 'world_simple_joint' into a fixed joint
Connecting the simple robot with a fixed joint to the word seems to be a bit of a problem.
I tried searching everywhere on the internet, but there's nothing on spawning different robots. Just the usual multirobot system, where there's one URDF, one robot, that's being spawned multiple times in different namespaces. I found a post about two different things (an arm and a hand) being put together, but that uses a fixed joint (and system where there's an arm, and a tool at the end of it is quite common).
Is there a way to do this?
Thank you.