when I run roslaunch vswarm vswarm_gazebo.launch n:=3, error occured
Faust-Wang opened this issue · 27 comments
error:
ModuleNotFoundError: No module named 'vswarm'
ModuleNotFoundError: No module named 'vswarm.cfg
ImportError: dynamic module does not define module export function (PyInit_PyKDL)
process has died [pid 3432, exit code
Gazebo can open, but there is no uav.
At the beginning of startup, the terminal has mavros messages of three uavs.
Then the terminal will prompt that the vswarm model has not been found (catkin build has been successful) and some processes have been killed.
I need your help, thank you
This looks like a problem with the orocos
Python 3.6 bindings, see for instance this issue: orocos/orocos_kinematics_dynamics#96.
Try to closely follow the instructions in https://github.com/lis-epfl/vswarm/blob/master/docs/installation.md, especially the following section:
cd ~/catkin_ws/src/
sudo apt install python3-pip # required for pip installations
sudo apt install python3-sip-dev # PyKDL requirement
python3 -m pip install --user -r vswarm/requirements.txt
# This is a bad hack, but it works :) (build requirement for python_orocos_kdl)
ln -sf /usr/lib/python2.7/dist-packages/sipconfig{,_nd}.py ~/.local/lib/python3.6/site-packages/
ln -sf ${PX4_ROOT}/ROMFS ~/.ros/ # Let PX4 find its config (even when working dir is ~/.ros)
Hope this helps!
Thanks for your response.
I have run all the steps in this installation.md successfully.
The difference is that I didn't use ubuntu_sim_ros_melodic.sh to install PX4, but the official detailed guide.
But the terminal still told me I was missing a VSwarm module.
I think the way you install PX4 is not related to your issue. It looks like either catkin build
does not run successfully or you are not sourcing your environment correctly. Otherwise I'd expect the vswarm
and vswarm.cfg
modules to be found.
Can you check your ~/catkin_ws/devel/lib/python3/dist-packages/
and check if it contains the vswarm
folder?
Also check if the above path is contained in your $PYTHONPATH
.
Mine looks like this, for instance:
> echo $PYTHONPATH
/home/fabian/catkin_ws/devel/lib/python3/dist-packages:/opt/ros/melodic/lib/python2.7/dist-packages
OK, the missing module bug was resolved after I added the path.
However, the process will still be killed.
[drone_1/relative_localization_node-15] process has died [pid 2957, exit code -11
[drone_1/flocking_node-17] process has died [pid 2976, exit code -11
[drone_2/relative_localization_node-23] process has died [pid 3339
[drone_2/flocking_node-25] process has died [pid 3461, exit code -11
and so on.
In addition, Gazebo has only one green basin, and no airplane shows it. The ‘vswarm takeoff’ command can be used normally.
[Err] [Visual.cc:2361] Visual::InsertMesh no submeshes, this is an invalid mesh
[Err] [Visual.cc:373] Ogre Error:OGRE EXCEPTION(6:FileNotFoundException): Cannot locate resource /home/sysu/catkin_ws/src/vswarm/models/lequad/meshes/lequad_prop_ccw.stl in resource group Autodetect or any other group. in ResourceGroupManager::openResource at /build/ogre-1.9-B6QkmW/ogre-1.9-1.9.0+dfsg1/OgreMain/src/OgreResourceGroupManager.cpp (line 756)
[Err] [Visual.cc:374] Unable to create a mesh from /home/sysu/catkin_ws/src/vswarm/models/lequad/meshes/lequad_prop_ccw.stl
[Err] [Visual.cc:2361] Visual::InsertMesh no submeshes, this is an invalid mesh
[Err] [Visual.cc:373] Ogre Error:OGRE EXCEPTION(6:FileNotFoundException): Cannot locate resource /home/sysu/catkin_ws/src/vswarm/models/lequad/meshes/lequad_prop_ccw.stl in resource group Autodetect or any other group. in ResourceGroupManager::openResource at /build/ogre-1.9-B6QkmW/ogre-1.9-1.9.0+dfsg1/OgreMain/src/OgreResourceGroupManager.cpp (line 756)
[Err] [Visual.cc:374] Unable to create a mesh from /home/sysu/catkin_ws/src/vswarm/models/lequad/meshes/lequad_prop_ccw.stl
[Err] [Visual.cc:2361] Visual::InsertMesh no submeshes, this is an invalid mesh
[Err] [Visual.cc:373] Ogre Error:OGRE EXCEPTION(6:FileNotFoundException): Cannot locate resource /home/sysu/catkin_ws/src/vswarm/models/lequad/meshes/lequad_prop_cw.stl in resource group Autodetect or any other group. in ResourceGroupManager::openResource at /build/ogre-1.9-B6QkmW/ogre-1.9-1.9.0+dfsg1/OgreMain/src/OgreResourceGroupManager.cpp (line 756)
[Err] [Visual.cc:374] Unable to create a mesh from /home/sysu/catkin_ws/src/vswarm/models/lequad/meshes/lequad_prop_cw.stl
[Err] [Visual.cc:2361] Visual::InsertMesh no submeshes, this is an invalid mesh
[Err] [Visual.cc:373] Ogre Error:OGRE EXCEPTION(6:FileNotFoundException): Cannot locate resource /home/sysu/catkin_ws/src/vswarm/models/lequad/meshes/lequad_prop_cw.stl in resource group Autodetect or any other group. in ResourceGroupManager::openResource at /build/ogre-1.9-B6QkmW/ogre-1.9-1.9.0+dfsg1/OgreMain/src/OgreResourceGroupManager.cpp (line 756)
[Err] [Visual.cc:374] Unable to create a mesh from /home/sysu/catkin_ws/src/vswarm/models/lequad/meshes/lequad_prop_cw.stl
[Err] [Visual.cc:2361] Visual::InsertMesh no submeshes, this is an invalid mesh
[Err] [Visual.cc:373] Ogre Error:OGRE EXCEPTION(6:FileNotFoundException): Cannot locate resource /home/sysu/catkin_ws/src/vswarm/models/lequad/meshes/lequad.stl in resource group Autodetect or any other group. in ResourceGroupManager::openResource at /build/ogre-1.9-B6QkmW/ogre-1.9-1.9.0+dfsg1/OgreMain/src/OgreResourceGroupManager.cpp (line 756)
[Err] [Visual.cc:374] Unable to create a mesh from /home/sysu/catkin_ws/src/vswarm/models/lequad/meshes/lequad.stl
Make sure you have git-lfs (Git Large File Storage) installed otherwise the 3D meshes will not be cloned. Alternatively you can download the meshes directly from GitHub and place them into the correct folder: https://github.com/lis-epfl/vswarm/tree/master/models/lequad/meshes.
It feels like the problem has been solved.
When I run 'vswarm takeoff ', it will show
Swarm control: /drone_1/mavros/cmd/takeoff success.
Swarm control: /drone_2/mavros/cmd/takeoff success.
Swarm control: /drone_3/mavros/cmd/takeoff success.
Swarm control: /drone_2/mavros/cmd/arming success.
Swarm control: /drone_3/mavros/cmd/arming success.
Swarm control: /drone_1/mavros/cmd/arming success.
Another terminal show
[ERROR] [1626867068.410419679, 7.252000000]: FCU: Using minimum takeoff altitude: 2.50 m
However, three planes took off normally.
But when I run 'vswarm offboard ', it will show
Swarm control: /drone_3/mavros/set_mode success.
Swarm control: /drone_2/mavros/set_mode success.
Swarm control: /drone_1/mavros/set_mode success.
However, another terminal show
[ WARN] [1626867360.529356727, 123.988000000]: CMD: Unexpected command 176, result 1
[ WARN] [1626867360.531238565, 123.988000000]: CMD: Unexpected command 176, result 1
[ WARN] [1626867360.538935285, 123.996000000]: CMD: Unexpected command 176, result 1
But, the three drones hover in the air without moving
And, the error of the process being killed still exists
[drone_1/relative_localization_node-15] process has died [pid 60014, exit code -11, cmd /home/sysu/catkin_ws/src/vswarm/src/relative_localization_node.py detections:=object_detection_node/detections __name:=relative_localization_node __log:=/home/sysu/.ros/log/270a012a-ea21-11eb-a164-000c29626587/drone_1-relative_localization_node-15.log]
[drone_1/flocking_node-17] process has died [pid 60037, exit code -11, cmd /home/sysu/catkin_ws/src/vswarm/src/flocking_node.py detections:=multi_target_tracking_node/detections pose:=mavros/vision_pose/pose migration:=/gcs/migration_node/setpoint __name:=flocking_node __log:=/home/sysu/.ros/log/270a012a-ea21-11eb-a164-000c29626587/drone_1-flocking_node-17.log].
[drone_2/relative_localization_node-23] process has died [pid 60263, exit code -11, cmd /home/sysu/catkin_ws/src/vswarm/src/relative_localization_node.py detections:=object_detection_node/detections __name:=relative_localization_node __log:=/home/sysu/.ros/log/270a012a-ea21-11eb-a164-000c29626587/drone_2-relative_localization_node-23.log].
[drone_2/flocking_node-25] process has died [pid 60409, exit code -11, cmd /home/sysu/catkin_ws/src/vswarm/src/flocking_node.py detections:=multi_target_tracking_node/detections pose:=mavros/vision_pose/pose migration:=/gcs/migration_node/setpoint __name:=flocking_node __log:=/home/sysu/.ros/log/270a012a-ea21-11eb-a164-000c29626587/drone_2-flocking_node-25.log]
[drone_3/relative_localization_node-31] process has died [pid 60616, exit code -11, cmd /home/sysu/catkin_ws/src/vswarm/src/relative_localization_node.py detections:=object_detection_node/detections __name:=relative_localization_node __log:=/home/sysu/.ros/log/270a012a-ea21-11eb-a164-000c29626587/drone_3-relative_localization_node-31.log].
[drone_3/flocking_node-33] process has died [pid 60757, exit code -11, cmd /home/sysu/catkin_ws/src/vswarm/src/flocking_node.py detections:=multi_target_tracking_node/detections pose:=mavros/vision_pose/pose migration:=/gcs/migration_node/setpoint __name:=flocking_node __log:=/home/sysu/.ros/log/270a012a-ea21-11eb-a164-000c29626587/drone_3-flocking_node-33.log]
There is no simulation video on your YouTube, do you record simulation video?
I have meet the same trouble
I have meet the same trouble
However. I haven't found out why I can't do cluster movement.
您好,我现在也在研究这个项目,也是遇到了跟您一样的问题,请问您解决这个问题了吗? 另外,我也从事无人机集群控制方面的研究,有机会可以多交流😃
…
---Original--- From: @.> Date: Fri, Sep 24, 2021 14:32 PM To: @.>; Cc: @.@.>; Subject: Re: [lis-epfl/vswarm] when I run roslaunch vswarm vswarm_gazebo.launch n:=3, error occured (#1) I have meet the same trouble However. I haven't found out why I can't do cluster movement. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
The problem I encountered was that there was no response to executing cluster commands after takeoff.
Actually, I'm waiting to hear back from the author of the paper
This is probably an installation issue: check if all the imports are working correctly (i.e., don't throw errors) in relative_localization_node.py
.
This is probably an installation issue: check if all the imports are working correctly (i.e., don't throw errors) in
relative_localization_node.py
.
I checked that the packages imported by Python were all correct
When I attempted to roslaunch relative_localization_node.launch, the same mistake occurred.
NODES
/
relative_localization_node (vswarm/relative_localization_node.py)
ROS_MASTER_URI=http://127.0.0.1:11311
process[relative_localization_node-1]: started with pid [21144]
[relative_localization_node-1] process has died [pid 21144, exit code -11, cmd /home/wane/catkin_ws/src/vswarm/src/relative_localization_node.py detections:=object_detection_node/detections __name:=relative_localization_node __log:=/home/wane/.ros/log/6e9510c8-1dcc-11ec-a099-b2e5f9c088b3/relative_localization_node-1.log].
log file: /home/wane/.ros/log/6e9510c8-1dcc-11ec-a099-b2e5f9c088b3/relative_localization_node-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete
done
When I debug the relative_localization_node.py, this is a problem in "import tf2_geometry_msgs ------- import PyKDL", maybe this is the reason why the [relative_localization_node-1] process has died.
That's it. Follow the installation instructions at https://github.com/lis-epfl/vswarm/blob/master/docs/installation.md and make sure you can import all libraries without errors.
I have followed the installation instruction at https://github.com/lis-epfl/vswarm/blob/master/docs/installation.md and make sure I can import all libraries without errors
but the [drone_1/relative_localization_node-15] [drone_2/relative_localization_node-15] [drone_3 /relative_localization_node-15] process still would died
That's it. Follow the installation instructions at https://github.com/lis-epfl/vswarm/blob/master/docs/installation.md and make sure you can import all libraries without errors.
If run relative_localization_node.py in terminal, it will show Segmentation fault( core dumped), so it might not be an installation issue. Could the author help to figure out what is the problem.
---Original--- From: @.> Date: Fri, Sep 24, 2021 14:32 PM To: @.>; Cc: @.@.>; Subject: Re: [lis-epfl/vswarm] when I run roslaunch vswarm vswarm_gazebo.launch n:=3, error occured (#1) I have meet the same trouble However. I haven't found out why I can't do cluster movement. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
The problem I encountered was that there was no response to executing cluster commands after takeoff.
Actually, I'm waiting to hear back from the author of the paper
This is probably an installation issue: check if all the imports are working correctly (i.e., don't throw errors) in
relative_localization_node.py
.I checked that the packages imported by Python were all correct
So have you worked out this problem?
This is probably an installation issue: check if all the imports are working correctly (i.e., don't throw errors) in
relative_localization_node.py
.I checked that the packages imported by Python were all correct
So have you worked out this problem?
However, I didn't run it successfully here either
Could you share any progress regarding the cluster command?
I also have the same issue ( [drone_x/relative_localization_node-15] process are died).
I'm sorry, but this error is still unresolved. Please let me know if you have any progress.
Can someone run this project successfully?
Unfortunately, I cannot still run this project.
As I mentioned above, I am fairly sure that the error arises from the PyKDL
dependency of tf2_geometry_msgs
but it is also possible that package updates broke the installation as it is written in the README.
The tf2_geometry_msgs
package only provides convenience functions for frame transformations and is only used in the following line:
vswarm/src/relative_localization_node.py
Line 137 in d18ce64
One option you have is to implement this frame transformations yourself. Here is the source, it is quite straight forward: tf2_geometry_msgs.py.
In any case, relative_localization_node.py is just a thin ROS wrapper around relative_localization.py and computes 3D relative positions from 2D image observations.
I meet the same issue.
first
ModuleNotFoundError: No module named 'vswarm'
ModuleNotFoundError: No module named 'vswarm.cfg
then
Gazebo has only one green basin, and no airplane shows it
error:don't have models
have you run this project?大佬
It feels like the problem has been solved. When I run 'vswarm takeoff ', it will show Swarm control: /drone_1/mavros/cmd/takeoff success. Swarm control: /drone_2/mavros/cmd/takeoff success. Swarm control: /drone_3/mavros/cmd/takeoff success. Swarm control: /drone_2/mavros/cmd/arming success. Swarm control: /drone_3/mavros/cmd/arming success. Swarm control: /drone_1/mavros/cmd/arming success.
Another terminal show [ERROR] [1626867068.410419679, 7.252000000]: FCU: Using minimum takeoff altitude: 2.50 m
However, three planes took off normally.
But when I run 'vswarm offboard ', it will show Swarm control: /drone_3/mavros/set_mode success. Swarm control: /drone_2/mavros/set_mode success. Swarm control: /drone_1/mavros/set_mode success.
However, another terminal show [ WARN] [1626867360.529356727, 123.988000000]: CMD: Unexpected command 176, result 1 [ WARN] [1626867360.531238565, 123.988000000]: CMD: Unexpected command 176, result 1 [ WARN] [1626867360.538935285, 123.996000000]: CMD: Unexpected command 176, result 1
But, the three drones hover in the air without moving
And, the error of the process being killed still exists
[drone_1/relative_localization_node-15] process has died [pid 60014, exit code -11, cmd /home/sysu/catkin_ws/src/vswarm/src/relative_localization_node.py detections:=object_detection_node/detections __name:=relative_localization_node __log:=/home/sysu/.ros/log/270a012a-ea21-11eb-a164-000c29626587/drone_1-relative_localization_node-15.log] [drone_1/flocking_node-17] process has died [pid 60037, exit code -11, cmd /home/sysu/catkin_ws/src/vswarm/src/flocking_node.py detections:=multi_target_tracking_node/detections pose:=mavros/vision_pose/pose migration:=/gcs/migration_node/setpoint __name:=flocking_node __log:=/home/sysu/.ros/log/270a012a-ea21-11eb-a164-000c29626587/drone_1-flocking_node-17.log]. [drone_2/relative_localization_node-23] process has died [pid 60263, exit code -11, cmd /home/sysu/catkin_ws/src/vswarm/src/relative_localization_node.py detections:=object_detection_node/detections __name:=relative_localization_node __log:=/home/sysu/.ros/log/270a012a-ea21-11eb-a164-000c29626587/drone_2-relative_localization_node-23.log]. [drone_2/flocking_node-25] process has died [pid 60409, exit code -11, cmd /home/sysu/catkin_ws/src/vswarm/src/flocking_node.py detections:=multi_target_tracking_node/detections pose:=mavros/vision_pose/pose migration:=/gcs/migration_node/setpoint __name:=flocking_node __log:=/home/sysu/.ros/log/270a012a-ea21-11eb-a164-000c29626587/drone_2-flocking_node-25.log] [drone_3/relative_localization_node-31] process has died [pid 60616, exit code -11, cmd /home/sysu/catkin_ws/src/vswarm/src/relative_localization_node.py detections:=object_detection_node/detections __name:=relative_localization_node __log:=/home/sysu/.ros/log/270a012a-ea21-11eb-a164-000c29626587/drone_3-relative_localization_node-31.log]. [drone_3/flocking_node-33] process has died [pid 60757, exit code -11, cmd /home/sysu/catkin_ws/src/vswarm/src/flocking_node.py detections:=multi_target_tracking_node/detections pose:=mavros/vision_pose/pose migration:=/gcs/migration_node/setpoint __name:=flocking_node __log:=/home/sysu/.ros/log/270a012a-ea21-11eb-a164-000c29626587/drone_3-flocking_node-33.log]
There is no simulation video on your YouTube, do you record simulation video?
HP: requesting home position
I've tried subscribing to the topic of location in mavros,such as /drone_1/mavros/local_position/pose, but got nothing, so the problem should be that the gps plugin is not working properly.
Have you encountered the gps plugin problem? I can't get the gps information from the code. However, roslaunch px4 mavros_posix_sitl.launch, there are gps information. I have px4 1.10.2+Gazebo 9.19.0.
I have meet the same trouble
However. I haven't found out why I can't do cluster movement.
I can't do cluster movement too. Did you resolve the problem? I‘m looking forward to your reply.