osrf / rmf_core

Provides the centralized functions of RMF: scheduling, etc.
Apache License 2.0
102 stars 41 forks source link

Unable to spawn tinyRobot and deliveryRobot in RViz #269

Closed destkk closed 3 years ago

destkk commented 3 years ago

Using Ubuntu 20.04

Hi everyone. I am having trouble in spawning tinyRobot and deliveryRobot in RVIz but I could see the models in Gazebo.

I have checked the codes related between the files and I found out that according to the code below, when its written in this <arg name="robot_prefix" value="TinyRobot"/> and <arg name="robot_prefix" value="DeliveryRobot"/> with CAPS "T" and "D" for both robots, RViz could not spawn the robots but able to launch both fleet adapters.

If both letters are in "t" and "d", it could spawn the robots but the fleet adapters are unable to launch.

Probably the robot_prefix value is based on the rmf_demo_assets model name? But I could not understand why it affects one another.

<!-- TinyRobot fleet adapter and robot state aggregator needed for the TinyRobot slotcar_plugin -->
  <group>
    <let name="fleet_name" value="tinyRobot"/>
    <include file="$(find-pkg-share demos)/include/adapters/tinyRobot_adapter.launch.xml">
      <arg name="fleet_name" value="$(var fleet_name)"/>
      <arg name="use_sim_time" value="$(var use_sim_time)"/>
      <arg name="nav_graph_file" value="$(find-pkg-share rmf_demo_maps)/maps/test_building/nav_graphs/0.yaml" />
    </include>
    <include file="$(find-pkg-share rmf_fleet_adapter)/robot_state_aggregator.launch.xml">
      <arg name="robot_prefix" value="TinyRobot"/>
      <arg name="fleet_name" value="$(var fleet_name)"/>
      <arg name="use_sim_time" value="true"/>
    </include>
  </group>

<!-- DeliveryRobot fleet adapter and robot state aggregator needed for DeliveryRobot slotcar_plugin -->
  <group>
    <let name="fleet_name" value="deliveryRobot"/>
    <include file="$(find-pkg-share demos)/include/adapters/deliveryRobot_adapter.launch.xml">
      <arg name="fleet_name" value="$(var fleet_name)"/>
      <arg name="use_sim_time" value="$(var use_sim_time)"/>
      <arg name="nav_graph_file" value="$(find-pkg-share rmf_demo_maps)/maps/test_building/nav_graphs/1.yaml" />
    </include>
    <include file="$(find-pkg-share rmf_fleet_adapter)/robot_state_aggregator.launch.xml">
      <arg name="robot_prefix" value="DeliveryRobot"/>
      <arg name="fleet_name" value="$(var fleet_name)"/>
      <arg name="use_sim_time" value="true"/>
    </include>
  </group>
mxgrey commented 3 years ago

Are you running launch scripts directly from rmf_demos or are you running your own launch scripts? If they're from rmf_demos please let us know which scripts are failing. If it's your own scripts, it would probably be best to share your repo with us, or else it's unlikely that we'll be able to identify what's wrong.

If both letters are in "t" and "d", it could spawn the robots but the fleet adapters are unable to launch.

Could you elaborate on what you mean by "unable to launch"? Do the fleet adapters crash during startup? It may be helpful to put the launch file terminal output into a gist and link us to it.

mxgrey commented 3 years ago

I'll be closing this ticket due to inactivity.

To continue this discussion, I suggest opening a thread here: https://github.com/open-rmf/rmf/discussions