Closed Michelin-star-dishwasher closed 2 years ago
Hi, getting communication between coppeliasim(vrep) and ros is the first step. After this, you can create a new scene in vrep, and load drone model.
You can find a model named drone_pro2.0.ttm at /CoppeliaSim Models/drone_project, which is a drone model used in this proj. Add one or more this model to create a swarm of drone. Then, launch swarm.launch and bacterium_flocking.launch that provide controller and planner for the swarm.
I shall update the readme to add more details about usages. Cheers!
Hi, I have updated the Usage part and also changed some key parameters in package drone_controller.
Please re-download the package drone_controller and replace the old version. Cheers!
Hi, I have updated the Usage part and also changed some key parameters in package drone_controller.
Please re-download the package drone_controller and replace the old version. Cheers!
Thanks a lot for your sharing!But I got some problem here. After loading example_0.ttt into coopeliasim , I started the simulation after running the launch file according to the usage.But it seems like the drones doesn’t been controlled successfully and just fall like not starting the launch file.I don't know where I went wrong, do I missing or need to modify something somewhere in the project?
Did you get any errors or bugs in VREP? Or can you show your rqt_graph to check the communication network.
I guess you may forget to add an external msg 'mav_msgs/CommandMotorSpeed' into /sim_ros_interface/meta/messages.txt . This msgs is used as the standard msg type to send motor speed of quadrotor from c++ controller to VREP. If you missed it, drones in VREP cannot be controlled.
Please check it.
I did add 'mav_msgs/CommandMotorSpeed' into /sim_ros_interface/meta/messages.txt . Anyway,I checked VREP and found it got some error there:
[Quadricopter#1@childScript:error] 51: unsupported message type. please edit and recompile ROS plugin (in function 'simROS.subscribe@simExtROS') stack traceback: [C]: in function 'simROS-typecheck.subscribe' [string "Quadricopter#1@childScript"]:51: in function 'sysCall_init' [Quadricopter#1@childScript:error] 109: read in arg 1 (subscriberHandle): expected string (in function 'simROS.shutdownSubscriber@simExtROS') stack traceback: [C]: in function 'simROS-typecheck.shutdownSubscriber' [string "Quadricopter#1@childScript"]:109: in function 'sysCall_cleanup'
Then I looked into the package 'sim_ros_interface,there are some hints like:
include <simPlusPlus/Handle.h>
Could not open source file "simPlusPlus/Handle.h" .
However,I couldn't find the relevant source files in the project so I don't know what to do next. (sorry for my dumb question😢
I think the problem is you did not compile this msg correctly.
set(PKG_DEPS roscpp rosconsole cv_bridge image_transport tf roslib actionlib_msgs control_msgs diagnostic_msgs geometry_msgs map_msgs mav_msgs nav_msgs sensor_msgs shape_msgs std_msgs tf2_geometry_msgs tf2_msgs trajectory_msgs visualization_msgs)
Hope this helps!
It turns out I lost some requirements and finally solved the problem. Thank you for all the efforts that you put in!🦸
I'm freshman to this research direction and came across this fantastic project you've done. I have established the communication between coppeliasim and ROS now, but I don't know how to make the project run in the next step.Any advice you or anyone else can recommend? Thanks again!