Skip to content
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

feat(tier4_debug_rviz_plugin)!: replace tier4_debug_msgs with tier4_internal_debug_msgs #202

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion common/tier4_debug_rviz_plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ Note that jsk_overlay_utils.cpp and jsk_overlay_utils.hpp are BSD license.

### Float32MultiArrayStampedPieChart

Pie chart from `tier4_debug_msgs::msg::Float32MultiArrayStamped`.
Pie chart from `autoware_internal_debug_msgs::msg::Float32MultiArrayStamped`.

![float32_multi_array_stamped_pie_chart](./images/float32_multi_array_stamped_pie_chart.png)
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
#include <rviz_common/validate_floats.hpp>
#include <tier4_debug_rviz_plugin/jsk_overlay_utils.hpp>

#include <tier4_debug_msgs/msg/float32_multi_array_stamped.hpp>
#include <autoware_internal_debug_msgs/msg/float32_multi_array_stamped.hpp>

#include <mutex>

Expand All @@ -87,7 +87,7 @@ class Float32MultiArrayStampedPieChartDisplay : public rviz_common::Display
virtual void onDisable();
virtual void onInitialize();
virtual void processMessage(
const tier4_debug_msgs::msg::Float32MultiArrayStamped::ConstSharedPtr msg);
const autoware_internal_debug_msgs::msg::Float32MultiArrayStamped::ConstSharedPtr msg);
virtual void drawPlot(double val);
virtual void update(float wall_dt, float ros_dt);
// properties
Expand All @@ -114,7 +114,7 @@ class Float32MultiArrayStampedPieChartDisplay : public rviz_common::Display
rviz_common::properties::FloatProperty * med_color_threshold_property_;
rviz_common::properties::BoolProperty * clockwise_rotate_property_;

rclcpp::Subscription<tier4_debug_msgs::msg::Float32MultiArrayStamped>::SharedPtr sub_;
rclcpp::Subscription<autoware_internal_debug_msgs::msg::Float32MultiArrayStamped>::SharedPtr sub_;
int left_;
int top_;
uint16_t texture_size_;
Expand Down
1 change: 0 additions & 1 deletion common/tier4_debug_rviz_plugin/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<depend>rviz_common</depend>
<depend>rviz_default_plugins</depend>
<depend>rviz_rendering</depend>
<depend>tier4_debug_msgs</depend>

<test_depend>ament_lint_auto</test_depend>
<test_depend>autoware_lint_common</test_depend>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<class name="rviz_plugins/Float32MultiArrayStampedPieChart"
type="rviz_plugins::Float32MultiArrayStampedPieChartDisplay"
base_class_type="rviz_common::Display">
<description>Display drivable area of tier4_debug_msgs::msg::Float32MultiArrayStamped</description>
<description>Display drivable area of autoware_internal_debug_msgs::msg::Float32MultiArrayStamped</description>
</class>
<class name="rviz_plugins/StringStampedOverlayDisplay"
type="rviz_plugins::StringStampedOverlayDisplay"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ Float32MultiArrayStampedPieChartDisplay::Float32MultiArrayStampedPieChartDisplay
: rviz_common::Display(), update_required_(false), first_time_(true), data_(0.0)
{
update_topic_property_ = new rviz_common::properties::StringProperty(
"Topic", "", "tier4_debug_msgs::msg::Float32MultiArrayStamped topic to subscribe to.", this,
"Topic", "",
"autoware_internal_debug_msgs::msg::Float32MultiArrayStamped topic to subscribe to.", this,
SLOT(updateTopic()), this);
data_index_property_ = new rviz_common::properties::IntProperty(
"data index", 0, "data index in message to visualize", this, SLOT(updateDataIndex()));
Expand Down Expand Up @@ -178,7 +179,7 @@ void Float32MultiArrayStampedPieChartDisplay::update(
}

void Float32MultiArrayStampedPieChartDisplay::processMessage(
const tier4_debug_msgs::msg::Float32MultiArrayStamped::ConstSharedPtr msg)
const autoware_internal_debug_msgs::msg::Float32MultiArrayStamped::ConstSharedPtr msg)
{
std::lock_guard<std::mutex> lock(mutex_);

Expand Down Expand Up @@ -297,10 +298,11 @@ void Float32MultiArrayStampedPieChartDisplay::subscribe()

if (topic_name.length() > 0 && topic_name != "/") {
rclcpp::Node::SharedPtr raw_node = context_->getRosNodeAbstraction().lock()->get_raw_node();
sub_ = raw_node->create_subscription<tier4_debug_msgs::msg::Float32MultiArrayStamped>(
topic_name, 1,
std::bind(
&Float32MultiArrayStampedPieChartDisplay::processMessage, this, std::placeholders::_1));
sub_ =
raw_node->create_subscription<autoware_internal_debug_msgs::msg::Float32MultiArrayStamped>(
topic_name, 1,
std::bind(
&Float32MultiArrayStampedPieChartDisplay::processMessage, this, std::placeholders::_1));
}
}

Expand Down
Loading