Open k-okada opened 4 years ago
トピックとサービスで出ていて、トピックはモデルが多くなると、 他のモデルのデータも含めて出るのでgazeboが遅くなるかも。 あと、time stampついてないですね。
$ rostopic echo /gazebo/model_states
---
name: [ground_plane]
pose:
-
position:
x: 0.0
y: 0.0
z: 0.0
orientation:
x: 0.0
y: 0.0
z: 0.0
w: 1.0
twist:
-
linear:
x: 0.0
y: 0.0
z: 0.0
angular:
x: 0.0
y: 0.0
z: 0.0
---
サービスはモデル名指定 (get_link_stateでリンク名指定)で特定のモデル(リンク)の姿勢が取れる。 time stampもついてくる。 こちらを定期的にコールして、poseとかposedetection_msgs をpubするpython書くんでしょうか?
$ rosservice call /gazebo/get_model_state '{model_name: "ground_plane"}'
---
header:
seq: 2
stamp:
secs: 387
nsecs: 133000000
frame_id: ''
pose:
position:
x: 0.0
y: 0.0
z: 0.0
orientation:
x: 0.0
y: 0.0
z: 0.0
w: 1.0
twist:
linear:
x: 0.0
y: 0.0
z: 0.0
angular:
x: 0.0
y: 0.0
z: 0.0
success: True
status_message: "GetModelState: got properties"
---
あれ、こんな便利ノードあったんですか https://github.com/k-okada/rtmros_tutorials/blob/add_gazebo_model_pose_publish/hironx_tutorial/launch/gazebo_mode_pose_publish.launch#L3
requires https://github.com/ros-simulation/gazebo_ros_pkgs/pull/1098
@YoheiKakiuchi @Naoki-Hiraoka @pazeshun gazebo で物体の位置姿勢ってダイレクトに取れるんだと思うけど,そのためのやりかった(ノード)って何処かにあるのかな.
シミュレーション思い人向けに画像処理有り/無しを切り替えられたら良いと思って.