justagist / panda_simulator

A Gazebo simulator for the Franka Emika Panda robot with ROS interface, supporting sim-to-real code transfer (Python). Exposes customisable controllers and state feedback from robot in simulation.
Apache License 2.0
212 stars 61 forks source link

Dual-arm Simulation using PandaRobotHWSim #41

Closed D-Blade closed 3 years ago

D-Blade commented 3 years ago

Hello, thank you very much for your work!

I'm trying to set up a dual-arm simulation environment using the PandaRobotHWSim interface but cannot find a convenient way to configure different namespaces for the controllers and the topics. According to the source code of the plugin, it seems that the namespace of the controller is somehow hard-coded and cannot be modified. Could you please provide some advice if possible? Thank you very much in advance.

justagist commented 3 years ago

Hi, Glad you found this package useful.

The PandaRobotHWSim interface was not written for a multi-robot setup originally, and a lot of the code is, as you said, hard-coded for a single instance of the robot. The namespaces being used in the interface are directly loaded from the franka_panda_description package (see panda.transmission.xacro file). However, I am not sure how the custom hardware interface would respond to having multiple instances of it running simultaneously, but feel free to test it out. If you don't really need to use franka_ros_interface or panda_robot interfaces, and only want to have multiple instances of the arm in the simulator, then I would recommend trying to modify a simulator that uses one of the default gazebo hardware interfaces; it would be easier to make the required changes to the launch file (and maybe the description files as well) to load two robots in the simulator. One example of such a package that uses the default ROS/Gazebo interfaces is gazebo_panda. Sorry for not being more helpful. If you manage to get a dual-arm setup working with either of these simulator packages, it would be great if you could contribute to the repositories with a PR!