How ot spawned a hector quadrotor in c++ with necessary topics (control plugins) [closed]
Hi everyone
I am using ros gazebo to doing my research project. I meet with one problem and cannot solve it. Hope anyone can offer me some inspirations for solving it.
I spawn all hector quadrotor in a .launch file. And then, use a c++ file for writing controlling algorithm for all these robots. But I need to dynamically remove or respawn robots based on some conditions. And I can finish remove part by myself. But, in terms of respawning robots, I can only spawn the model without any necessay control part for controlling it (e.g., cmd_vel topic for moving and ground_to_truth/pose for sensing the position).
I check the spawn_quadrotor.launch file which is a based launch file for generating a quadrotor in gazebo. I found except for .urdf file, it still include other node packages, like control part (ground_to_truth control). I think that is why I only spawn a model and just a model in c++.
Now, I have a .xacro file for descripting the robot and .launch file for just spawning a hector quadrotor. I need to spawn a hector quadrotor only in c++ with necessary controlling topics (actually cmd_vel and ground_to_truth/pose only). Does anyone know how to realize it?
Thanks for helps from anyone.
Jason