-
Notifications
You must be signed in to change notification settings - Fork 92
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
Depth cameras #181
Merged
Merged
Depth cameras #181
Changes from 3 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
3a04f9f
Depth cameras ros bridge, documentatio
SijmenHuizenga 6a0909b
Better description for depth cameras
SijmenHuizenga 1aefb1f
Added noise
SijmenHuizenga c6e8b61
Write some rules about depth cameras
SijmenHuizenga 588a437
Depth camera's not allowed during competition
SijmenHuizenga df4809a
Do not have depth camera in default settings.json
SijmenHuizenga File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Cameras | ||
|
||
To add a camera to your vehicle, add the following json to the "Cameras" map in your `settings.json`: | ||
|
||
``` | ||
"Camera1": { | ||
"CaptureSettings": [{ | ||
"ImageType": 0, | ||
"Width": 785, | ||
"Height": 785, | ||
"FOV_Degrees": 90 | ||
}], | ||
"X": 1.0, | ||
"Y": 0.06, | ||
"Z": -2.20, | ||
"Pitch": 0.0, | ||
"Roll": 0.0, | ||
"Yaw": 180 | ||
} | ||
``` | ||
|
||
`Camera1` is the name of the camera. This name will be used in ros topics and in coordinate frame. | ||
|
||
`X`, `Y` and `Z` are the position of the lidar relative the [vehicle pawn center](vehicle_model.md) of the car in NED frame. | ||
|
||
`Roll`,`Pitch` and `Yaw` are rotations in degrees. | ||
|
||
`ImageType` describes the type of camera. | ||
At this moment only rgb and depth cameras are supported. | ||
For rgb camera, set this value to 0 and for depth camera set the value to 2. | ||
|
||
* Depth Cameras (aka DepthPerspective) act as follows: each pixel is given a float value in meters corresponding to the smallest distance from the camera to that point. Images published in ros are encoded in `32FC1` | ||
* RGB images are just your normal video camera. Images published in ros are encoded using `bgr8` | ||
|
||
`FOV_Degrees` describes [how much the camera sees](https://en.wikipedia.org/wiki/Field_of_view). | ||
The vertical FoV will be automatically calculated using the following formula: `vertical FoV = image height / image width * horizontal FoV`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am slightly confused about the rounding - how exactly does it work? Can you provide an example?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copied it from here ;) https://stackoverflow.com/a/9194117/2328729
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it rounds up to the nearest multiple of another number