0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Pointを受信するDisplay pluginを作る

Last updated at Posted at 2021-03-12

rviz2プラグインの作り方 トップページへ

実行例

image.png
作成したTool pluginでpublishしたトピックを使用して矢印を動かす例

ROS1版

こちらのコードをrviz2用に書き直します
ROS講座111 Pointを受信するrviz display pluginを作る

ROS1からの主な変更点

point_display.hpp

受け取るトピックの型を直します

.hpp
    // void processMessage(const geometry_msgs::PointStamped::ConstPtr &msg);
    void processMessage(geometry_msgs::msg::PointStamped::ConstSharedPtr msg) override;

矢印のオブジェクトの名前空間を直します

.hpp
    //boost::shared_ptr<rviz::Arrow> vis_arrow_;
    std::shared_ptr<rviz_rendering::Arrow> vis_arrow_;

properties:: が入ったので追加します

.hpp
    rviz_common::properties::ColorProperty *color_property_;
    rviz_common::properties::FloatProperty *alpha_property_;

point_display.cpp

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?