-
Notifications
You must be signed in to change notification settings - Fork 4
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
Gazebo上で画像トピックを配信できるように変更 #46
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
ca4774e
カメラを設定して画像トピックを配信
YusukeKato c8110f9
use_rgb_cameraがtrueのときcamera_linkをセットする
YusukeKato 94d4db3
camera_linkのテストを追加
YusukeKato 45a2bd5
画像トピックの解像度をD435に合わせる
YusukeKato 425c43a
RGBカメラのxacroファイルを作成
YusukeKato dc288b7
xacroファイル中の重複しているif文をひとまとめにする
YusukeKato 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
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,53 @@ | ||
<?xml version="1.0"?> | ||
<robot name="rgb_camera" xmlns:xacro="http://ros.org/wiki/xacro"> | ||
|
||
<xacro:include filename="$(find raspimouse_description)/urdf/common.xacro" /> | ||
|
||
<xacro:macro name="rgb_camera_settings" | ||
params="use_gazebo | ||
use_rgb_camera | ||
"> | ||
|
||
<xacro:if value="$(arg use_rgb_camera)"> | ||
<xacro:include filename="$(find realsense2_description)/urdf/_d435.urdf.xacro" /> | ||
<xacro:sensor_d435 | ||
parent="base_link" | ||
use_nominal_extrinsics="false" | ||
add_plug="false" | ||
use_mesh="true"> | ||
<origin xyz="0.08 0.0 0.055" rpy="0 0 0"/> | ||
</xacro:sensor_d435> | ||
</xacro:if> | ||
|
||
<xacro:if value="${use_gazebo}"> | ||
<gazebo> | ||
<plugin filename="ignition-gazebo-sensors-system" name="ignition::gazebo::systems::Sensors"> | ||
<render_engine>ogre2</render_engine> | ||
</plugin> | ||
</gazebo> | ||
|
||
<gazebo reference="camera_link"> | ||
<sensor name="camera_link" type="camera"> | ||
<update_rate>30.0</update_rate> | ||
<always_on>true</always_on> | ||
<ignition_frame_id>camera_link</ignition_frame_id> | ||
<pose>0 0 0 0 0 0</pose> | ||
<topic>/camera/color/image_raw</topic> | ||
<camera name="rgb_camera"> | ||
<horizontal_fov>1.20428</horizontal_fov> | ||
<image> | ||
<width>1920</width> | ||
<height>1080</height> | ||
<format>R8G8B8</format> | ||
</image> | ||
<clip> | ||
<near>0.02</near> | ||
<far>300</far> | ||
</clip> | ||
</camera> | ||
</sensor> | ||
</gazebo> | ||
</xacro:if> | ||
</xacro:macro> | ||
|
||
</robot> |
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 |
---|---|---|
|
@@ -20,6 +20,7 @@ | |
</plugin> | ||
</xacro:if> | ||
</gazebo> | ||
|
||
</xacro:macro> | ||
|
||
</robot> |
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.
カメラはdiff driveに関係しないので、urdf/sensorsに設定ファイル(rgb_camera.xacro)を作成してください。
#45
で追加したrealsenseの読み込みも移植してください。
rgb_camera.xacro