-
Notifications
You must be signed in to change notification settings - Fork 2
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
Camera class added and fiducial marker detections #7
Open
chris24sahadeo
wants to merge
13
commits into
master
Choose a base branch
from
camera_class_and_detections
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,406
−67
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
6f31efe
Testing package
chris24sahadeo 1d87386
Added camera class.
chris24sahadeo 332954b
ROSCpp Code Format
chris24sahadeo 93dfd61
Commit before making "Big Discussion" changes
chris24sahadeo 85da2ae
Midway commit.
chris24sahadeo affcb7d
FIXME:
chris24sahadeo 39ba34f
REVIEW ME
chris24sahadeo cd92303
Changed target orientations.
chris24sahadeo e992ef1
Fixing PR changes
chris24sahadeo b72067d
Requested changes made.
chris24sahadeo 73b26ac
Addressed all of Sarika's milestone 1b comments
chris24sahadeo 38d08de
Commit before implementing boot::filesystem
chris24sahadeo aa610a4
Switched to boost::filesystem
chris24sahadeo 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
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,69 @@ | ||
# `rviz_simulator` | ||
|
||
|
||
## Package Description | ||
The `rviz_simulator` is an interactive 3D environment built using RViz and Interactive Markers that can be used to generate fiducial target pixel locations. | ||
|
||
|
||
## Installation Instructions | ||
Requires ROS Kinectic Kame. | ||
|
||
Clone the repo into the `src` folder of your catkin workspace. | ||
Run `catkin_make` in the root of your workspace to build the `rviz_simulator` package. | ||
|
||
### Required Dependencies | ||
- YAML-cpp [Installation Instructions](https://github.com/jbeder/yaml-cpp) | ||
- Eigen [Installation Instructions](http://eigen.tuxfamily.org/dox/GettingStarted.html) | ||
- Ceres [Installation Instructions](http://ceres-solver.org/installation.html) | ||
|
||
## Execution Instructions | ||
Edit the `initialize_simulator.yaml` file to change the simulator configuration. | ||
|
||
Naviate to the root of your catkin workspace and run the `simulate.launch` file with the following command: | ||
> `roslaunch rviz_simulator simulate.launch` | ||
|
||
`simulate.launch` launches 2 nodes in normal mode: | ||
- `rviz` | ||
- `simulate` | ||
|
||
and 4 nodes in `debug_mode`: | ||
- `rviz` | ||
- `rqt_console` | ||
- `rqt_logger_level` | ||
- `simulate` | ||
|
||
To enter `debug_mode`, run the launch file with the command line arg | ||
> `debug_mode:=true` | ||
|
||
By default, the `rviz_simulator/config/photoneo_camera_intrinsics.yaml` file is loaded. To specify another camera intrinsics file, run the launch file with the command line arg | ||
> `camera_intrinsics_file:=<camera_intrinsics_file_name.yaml>` | ||
|
||
The `simulator` node creates a new folder with the name `"detections_<ROS_timestamp>"` in the `rviz_simulator` package folder. | ||
E.g. `detections_1565880269`: | ||
``` | ||
world_T_camera: | ||
rotation: [3.1404926443667587, -6.1629514791161225e-08, -0.083128525595253286] | ||
translation: [-3.4547343254089355, 1.3038516098695761e-07, 2.4355044364929199] | ||
detections: | ||
- targetID: 3 | ||
size: [0.10000000000000001, 0.10000000000000001] | ||
corners: | ||
0: [749.04850065520918, 426.08777643692048] | ||
1: [795.65300431471246, 426.13839052125752] | ||
2: [795.65300129230377, 380.00886350617435] | ||
3: [749.04849785406611, 380.05948125315223] | ||
- targetID: 4 | ||
size: [0.10000000000000001, 0.10000000000000001] | ||
corners: | ||
0: [294.01203861603608, 425.59359128189027] | ||
1: [338.63436644541946, 425.64205265550714] | ||
2: [338.63436555204686, 380.50523728899429] | ||
3: [294.0120379256731, 380.55370216948273] | ||
``` | ||
|
||
|
||
A new detections folder with a new timestamp is created each time `roslaunch` is run. | ||
|
||
Drag around the virtual camera and multiple virtual fiducial targets. | ||
|
||
Left click on the camera to generate a `YAML` file, in the created detections folder, with the measured target locations. |
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,14 @@ | ||
world_frame_id: "ROSWorld" | ||
|
||
# target parameters | ||
num_targets: 5 | ||
target_size: [.1, 0.1, 0.01] | ||
distance_between_targets: 1.0 | ||
starting_target_position: [0.0, 0.0, 0.0] # geometery_msgs::Point | ||
starting_target_orientation: [-1, 0, 0, 0, 0, 1, 0, 1, 0] # Eigen::Matrix3d ColMajor | ||
|
||
# camera parameters | ||
camera_intrinsics_file: "photoneo_camera_intrinsics.yaml" | ||
starting_camera_position: [0, 3, 0 ] # geometery_msgs::Point | ||
starting_camera_orientation: [-1, 0, 0, 0, 0, -1, 0, -1, 0] # Eigen::Matrix3d ColMajor | ||
|
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,20 @@ | ||
image_width: 1032 | ||
image_height: 772 | ||
camera_name: "Photoneo Camera" | ||
camera_matrix: | ||
rows: 3 | ||
cols: 3 | ||
data: [1109.596, 0, 503.712, 0, 1109.596, 403.0737, 0, 0, 1] | ||
distortion_model: "plumb_bob" | ||
distortion_coefficients: | ||
rows: 1 | ||
cols: 5 | ||
data: [0, 0, 0, 0, 0] | ||
rectification_matrix: | ||
rows: 3 | ||
cols: 3 | ||
data: [1, 0, 0, 0, 1, 0, 0, 0, 1] | ||
projection_matrix: | ||
rows: 3 | ||
cols: 4 | ||
data: [468.456, 0, 320, 0, 0, 468.456, 240, 0, 0, 0, 1, 0] |
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,22 @@ | ||
image_width: 1280 | ||
image_height: 720 | ||
camera_name: "Realsense Camera" | ||
near_clip: 0.1 # remove this | ||
far_clip: 5 # remove this | ||
camera_matrix: | ||
rows: 3 | ||
cols: 3 | ||
data: [468.456, 0, 320, 0, 468.456, 240, 0, 0, 1] | ||
distortion_model: "plumb_bob" | ||
distortion_coefficients: | ||
rows: 1 | ||
cols: 5 | ||
data: [0, 0, 0, 0, 0] | ||
rectification_matrix: | ||
rows: 3 | ||
cols: 3 | ||
data: [1, 0, 0, 0, 1, 0, 0, 0, 1] | ||
projection_matrix: | ||
rows: 3 | ||
cols: 4 | ||
data: [468.456, 0, 320, 0, 0, 468.456, 240, 0, 0, 0, 1, 0] |
Oops, something went wrong.
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.
The comment you are resolving only said you needed to include an example to the ROS Timestamp; not the entire detections file. The file sample clutters the README.
Additionally, in the below example, it looks like the time-stamped name is associated with the detections YAML file and this is not the case. It's actually used in the folder name.
Instead, if you want to provide detections examples, create an "examples" folder and upload a few examples of the file format to the repo. If you take this approach (which I would recommend), add in comments so anyone who wants to read this through knows what the fields mean and what the format is (e.g. if matrices are row or column major).