ethz-asl/mav_control_rw

Example of commands to the controller

alexbuyval opened this issue · 3 comments

Hi,

Thank you for good work.

I have successfully compiled and run described launch files in the readme. However, I stuck on the following:

You can use rqt to publish commands to the controller.

Are there any examples what should I publish into topics to run the controller?

I guess that I need to publish into /firefly/command/current_reference. Am I right? If so how exactly should I write a trajectory into the message publisher?

Best Regards,
Alex

Hi Alex,

As indicated in the main page of this repo, command/current_reference is among the published topics of the node, so you can't use this one to input a command.
What you can use to input commands the the controller is either command/pose or command/trajectory or rc. These are topics to which the controller subscribes.

For example, you can use the following command to input a single pose reference point at 1 meter height from the origin:
rostopic pub /firefly/command/pose geometry_msgs/PoseStamped '{header: {stamp: now, frame_id: "world"}, pose: {position: {x: 0, y:0, z: 1}, orientation: {w: 1.0}}}'

Regards,
Marco.

Thank you, Marco!

Alex

For anyone who tried @marco-tranzatto 's command and faced an issue, there is a small typo (The space after y's colon in 'position' is missing)
The correct command should be:
rostopic pub /firefly/command/pose geometry_msgs/PoseStamped '{header: {stamp: now, frame_id: "world"}, pose: {position: {x: 0, y: 0, z: 1}, orientation: {w: 1.0}}}'

Also note that you will need to start the simulation by calling unpause_physics service by

rosservice call /gazebo/unpause_physics