ZJU-FAST-Lab / EGO-Planner-v2

Swarm Playground, the codebase of the paper "Swarm of micro flying robots in the wild"
GNU General Public License v3.0
382 stars 70 forks source link

[Missing Drone] No drones seen in rviz #5

Closed coolermzb3 closed 2 years ago

coolermzb3 commented 2 years ago

Hello! Thank you very much for your excellent work!

I follow the tutorial in the video step by step and everything(planner, trajectory, swarm......) works well except that the drone itself is missing. I checked all the *.launch files in four subfolder and the drones are all invisible.

just as shown below: missing_drone

I followed tutorial in your another work ego-planner-swarm as well. And I can see the drone: normal_drone

I noticed that toggle on drone0/Simulation/robot makes the drone visible, but it's already on in the former launch.

I'm new to ROS, as well as rviz, launch file, etc and I'm not sure which log or message I should provide for troubleshooting. I'm looking forward to your reply, tkank you!

bigsuperZZZX commented 2 years ago

I have no idea why this would happen. The model file is stored in "swarm-playground\main_ws\src\Utils\odom_visualization\meshes\fake_drone.dae" and invoked in this line of code: "n.param("mesh_resource", mesh_resource, std::string("package://odom_visualization/meshes/fake_drone.dae"));" in "odom_visualization.cpp". Maybe you could replace the model file and the line of code I mentioned with the model and code in ego-planner-swarm repo. Hope this works for you.

coolermzb3 commented 2 years ago

Thank you! As an alternative, it works.

I copied "hummingbird.mesh" from ego-planner-swarm /src/uav_simulator/Utils/odom_visualization/meshes/

And I found it possible to modify "swarm-playground/main_ws/src/planner/plan_manage/launch/include/simulator.xml" to avoid recompiling the source code. In fact, some values in the source code will be overwritten by those with the same name in the "simulator.xml".

Besides, please check line 433~435 of "odom_visualization.cpp" which don't seem quite right. I guess maybe meshROS.scale.x = 2.0; should be replaced by meshROS.scale.x = scale; and so on.

Solution

  1. copy file as mentioned above.
  2. Add the line below into <node pkg="odom_visualization" ...... output="screen"> ...... </node> (around under line 52):
    <param name="mesh_resource" value="package://odom_visualization/meshes/hummingbird.mesh"/>

Still, I think I will keep the issue for a while and maybe someone would solve problem with *.dae

bigsuperZZZX commented 2 years ago

Thank you very much!