Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example of commands to the controller #2

Closed
alexbuyval opened this issue Feb 5, 2017 · 3 comments
Closed

Example of commands to the controller #2

alexbuyval opened this issue Feb 5, 2017 · 3 comments

Comments

@alexbuyval
Copy link

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

@marco-tranzatto
Copy link

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.

@alexbuyval
Copy link
Author

Thank you, Marco!

Alex

@adbidwai
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants