-
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
Conversation
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.
動作OKです。
xacroの構成についてコメントしました。
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
<realsenseの読み込み />
<xacro:if value="${use_gazebo}">
<センサプラグインの読み込み />
<カメラ設定の読み込み />
</xacro:if>
urdf/wheel/diffdrive.gazebo.xacro
Outdated
<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> |
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.
この行がTABでインデントされてます
urdf/wheel/diffdrive.gazebo.xacro
Outdated
<pose>0 0 0 0 0 0</pose> | ||
<topic>/camera/color/image_raw</topic> | ||
<camera name="rgb_camera"> | ||
<horizontal_fov>1.3962634</horizontal_fov> |
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.
D435のRGB画像の水平FOVは69度なので、1.20428が適していると思います。
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.
細かいところをコメントしました。
urdf/raspimouse.urdf.xacro
Outdated
<xacro:if value="$(arg use_gazebo)"> | ||
<xacro:gazebo_diffdrive_settings | ||
use_gazebo="$(arg use_gazebo)" |
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.
本PRとは関係ないですが、gazebo_diffdrive_settingsが実行時される時点で、
use_gazeboはTrueになるので、マクロにuse_gazebo引数は不要ですね。
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.
別PRでxacroファイルを整えるときに実施しましょう。
urdf/sensors/rgb_camera.xacro
Outdated
<xacro:if value="${use_gazebo}"> | ||
<plugin filename="ignition-gazebo-sensors-system" name="ignition::gazebo::systems::Sensors"> | ||
<render_engine>ogre2</render_engine> | ||
</plugin> | ||
</xacro:if> | ||
</gazebo> | ||
|
||
<gazebo reference="camera_link"> | ||
<xacro:if value="${use_gazebo}"> |
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.
個別にifを付けずに、ひとまとめにしてください。(1行減らせます)
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.
動作確認できました。LGTMです。
What does this implement/fix?
use_gazeboとuse_rgb_cameraがtrueのとき、画像トピックが配信されるように変更します。
Does this close any currently open issues?
しません。
How has this been tested?
use_gazeboとuse_rgb_cameraがtrueのときにcamera_linkがセットされたか確認するテストを追加しました。
colcon test
が通ることを確認しました。Any other comments?
Checklists