Skip to content

Added move camera to model service #1823

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

Merged
merged 2 commits into from
Dec 8, 2022

Conversation

ahcorde
Copy link
Contributor

@ahcorde ahcorde commented Nov 30, 2022

Signed-off-by: Alejandro Hernández Cordero [email protected]

🎉 Tutorial

Summary

Related with this PR #1810

Added tutorial about how to use /gui/move_to/model service

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

Signed-off-by: Alejandro Hernández Cordero <[email protected]>
@ahcorde ahcorde self-assigned this Nov 30, 2022
@ahcorde ahcorde requested a review from mjcarroll as a code owner November 30, 2022 22:12
@github-actions github-actions bot added the 🏯 fortress Ignition Fortress label Nov 30, 2022
@azeey azeey requested a review from iche033 December 5, 2022 19:30
@@ -0,0 +1,28 @@
\page move_camera_to_model Move Camera to model

This tutorial gives an introduction to Gazebo's service `/gui/move_to/model`. This service will allow to move the camera to a specific model taking in account distance and camera angle.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This tutorial gives an introduction to Gazebo's service `/gui/move_to/model`. This service will allow to move the camera to a specific model taking in account distance and camera angle.
This tutorial gives an introduction to Gazebo's service `/gui/move_to/model`. This service will allow to move the camera to a specific model taking into account distance to the model and camera angle.


## How to move the camera to a model

1. Load the **Angle View** plugin. This service is only available when loading the **Angle View** plugin.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. Load the **Angle View** plugin. This service is only available when loading the **Angle View** plugin.
1. Load the **View Angle** plugin. This service is only available when the **View Angle** plugin is loaded.


@image html files/move_camera_to_model/box_5.gif

But can put the camera far away, for example 20 meters:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
But can put the camera far away, for example 20 meters:
The camera can also be placed far away, for example 20 meters:

1. Load the **Angle View** plugin. This service is only available when loading the **Angle View** plugin.
2. Call the service using the request message type `ignition.msgs.GUICamera` and the response message type `ignition.msgs.Boolean`. The distance to the object is defined as the z coordinate, and the direction of the camera with a quaternion. It's possible to select the projection type.

For example, Let's move the camera to the `box` model looking down with 5 meters of separation.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
For example, Let's move the camera to the `box` model looking down with 5 meters of separation.
For example, Let's move the camera to the `box` model looking down from 5 meters away.

Signed-off-by: Alejandro Hernández Cordero <[email protected]>
@ahcorde ahcorde requested a review from iche033 December 7, 2022 18:18
@ahcorde ahcorde merged commit 828470c into ign-gazebo6 Dec 8, 2022
@ahcorde ahcorde deleted the ahcorde/6/move_to_model_tutorial branch December 8, 2022 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏯 fortress Ignition Fortress
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants