DFKI-NI / mobipick_labs

Other
4 stars 1 forks source link

How to make multiple mobipick? #57

Open Ronaldund opened 2 months ago

Ronaldund commented 2 months ago

I add

  <remap from="mobipick2/mobile_base_controller/odom"    to="mobipick2/odom" />
  <remap from="mobipick2/joint_states"                   to="mobipick2/gazebo_joint_states" />

in the mobipick_gazebo/mobipick_empty_world.launch, but have the error: [ERROR] [1726377313.435908, 0.000000]: Spawn service failed. Exiting. [mobipick2/spawn_urdf-1] process has died [pid 5004, exit code 1, cmd /opt/ros/noetic/lib/gazebo_ros/spawn_model -param robot_description -urdf -model mobipick -J mobipick2/ur5_shoulder_pan_joint 0.00 -J mobipick2/ur5_shoulder_lift_joint -2.10 -J mobipick2/ur5_elbow_joint 2.43 -J mobipick2/ur5_wrist_1_joint -2.05 -J mobipick2/ur5_wrist_2_joint -1.57 -J mobipick2/ur5_wrist_3_joint 3.14 -x -2 -y -2 -Y 0.0 __name:=spawn_urdf __log:=/home/hogan/.ros/log/9c6261d6-731e-11ef-a1d4-837bc7c9a203/mobipick2-spawn_urdf-1.log]. log file: /home/hogan/.ros/log/9c6261d6-731e-11ef-a1d4-837bc7c9a203/mobipick2-spawn_urdf-1*.log

How should I do can make the multiple mobipick? Please help me.

mintar commented 2 months ago

Unfortunately, this will not work right now. There are just too many places where the name "mobipick" is hardcoded, or where absolute topic paths (starting with "/") are used.

I'm planning on fixing this at some point, but I won't have time for it in the coming months at least.

If you want to have a go at it yourself, here are some starting points:

  1. There are instructions on how to run multiple MiR robots in the mir_robot README.
  2. Some of the launch files have arguments like prefix, tf_prefix and namespace. Theoretically, if you set all of them to "mobipick2" or something, then all topics should be moved from the "mobipick" namespace to the "mobipick2" namespace (and similar for the TF frames), and there should be almost no topic outside the "mobipick2" namespace. Unfortunately this is not the case (as I wrote above), and these launch file args, remappings etc. have to be introduced into all the launch files and nodes like they are in the mir_robot repo.