-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #793 from 708yamaguchi/camera-info-pub-yaml
- Loading branch information
Showing
6 changed files
with
152 additions
and
15 deletions.
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,64 @@ | ||
# camera_info_publisher | ||
|
||
`camera_info_publisher` provides camera info topics to an image or pointcloud without camera info. | ||
|
||
|
||
## Parameters | ||
|
||
* `~yaml_filename` (String, default: ``) | ||
|
||
Path to yaml file which has camera info information. | ||
|
||
* `~frame_id` (String, default: `camera`) | ||
|
||
Frame id of camera info. | ||
|
||
* `~parent_frame_id_` (Bool, default: `base_link`) | ||
|
||
Frame id of interactive marker. | ||
|
||
* `~sync_pointcloud` (String, default: `false`) | ||
|
||
Synchronize camera info to pointcloud. | ||
If both `~sync_pointcloud` and `~sync_image` are not specified, camera info is published at a static rate. | ||
|
||
* `~sync_image` (String, default: `false`) | ||
|
||
Synchronize camera info to image. | ||
|
||
* `~static_rate` (Double, default: `30.0`) | ||
|
||
Static rate at which camera info is published. | ||
If both `~sync_pointcloud` and `~sync_image` are not specified, camera info is published at a static rate. | ||
|
||
* `~width` (Double, default: `640`) | ||
|
||
With of published camera info. This parameter is enabled when `~yaml_filename` is not speficied. This parameter can be changed by dynamic reconfigure. | ||
|
||
* `~height` (Double, default: `480`) | ||
|
||
Height of published camera info. This parameter is enabled when `~yaml_filename` is not speficied. This parameter can be changed by dynamic reconfigure. | ||
|
||
* `~f` (Double, default: `525`) | ||
|
||
F of published camera_info. This parameter is enabled when `~yaml_filename` is not speficied. This parameter can be changed by dynamic reconfigure. | ||
|
||
|
||
## Subscribing Topics | ||
|
||
* `~input` (`sensor_msgs/Image` or `sensor_msgs/Pointcloud2`) | ||
|
||
Image or pointcloud whose camera info is published. | ||
|
||
|
||
## Publishing Topics | ||
|
||
* `~camera_info` (`sensor_msgs/CameraInfo`) | ||
|
||
Camera info which has the same timestamp as the input topic. | ||
|
||
## Sample | ||
|
||
``` | ||
roslaunch jsk_interactive_marker sample_camera_info_publisher.launch | ||
``` |
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
29 changes: 29 additions & 0 deletions
29
jsk_interactive_markers/jsk_interactive_marker/config/sample_camera_info.yaml
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,29 @@ | ||
# This file is generated by | ||
# $ rosrun camera_calibration cameracalibrator.py | ||
|
||
image_width: 1504 | ||
image_height: 1504 | ||
camera_name: narrow_stereo | ||
camera_matrix: | ||
rows: 3 | ||
cols: 3 | ||
data: [753.86903, 0. , 829.59748, | ||
0. , 703.23599, 918.33654, | ||
0. , 0. , 1. ] | ||
camera_model: plumb_bob | ||
distortion_coefficients: | ||
rows: 1 | ||
cols: 5 | ||
data: [-0.287251, 0.041911, -0.039052, -0.022004, 0.000000] | ||
rectification_matrix: | ||
rows: 3 | ||
cols: 3 | ||
data: [1., 0., 0., | ||
0., 1., 0., | ||
0., 0., 1.] | ||
projection_matrix: | ||
rows: 3 | ||
cols: 4 | ||
data: [678.98792, 0. , 847.68605, 0. , | ||
0. , 621.01874, 874.74736, 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
12 changes: 12 additions & 0 deletions
12
jsk_interactive_markers/jsk_interactive_marker/launch/sample_camera_info_publisher.launch
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,12 @@ | ||
<launch> | ||
|
||
<node pkg="jsk_interactive_marker" name="camera_info_publisher" type="camera_info_publisher" output="screen"> | ||
</node> | ||
|
||
<node pkg="jsk_interactive_marker" name="camera_info_publisher_with_yaml" type="camera_info_publisher" output="screen"> | ||
<rosparam subst_value="true"> | ||
yaml_filename: $(find jsk_interactive_marker)/config/sample_camera_info.yaml | ||
</rosparam> | ||
</node> | ||
|
||
</launch> |
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