Skip to content

Commit

Permalink
Update to be compatible with new rmw_qos_profile_t (#392)
Browse files Browse the repository at this point in the history
* update to be compatible with latest QoS changes

Signed-off-by: Miaofei <miaofei@amazon.com>

* correct initialization of rmw_qos_profile_t struct instances

Signed-off-by: Miaofei <miaofei@amazon.com>
  • Loading branch information
mm318 authored and wjwwood committed Apr 16, 2019
1 parent 77003fa commit b8be03d
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions rviz_common/include/rviz_common/ros_topic_display.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

#endif

#include "rmw/types.h"
#include "rmw/qos_profiles.h"

#include "rviz_common/display.hpp"
#include "rviz_common/display_context.hpp"
Expand All @@ -49,14 +49,13 @@
#include "rviz_common/ros_integration/ros_node_abstraction_iface.hpp"
#include "rviz_common/visibility_control.hpp"

static const rmw_qos_profile_t display_default =
static constexpr rmw_qos_profile_t display_default_qos_profile()
{
RMW_QOS_POLICY_HISTORY_KEEP_LAST,
5,
RMW_QOS_POLICY_RELIABILITY_RELIABLE,
RMW_QOS_POLICY_DURABILITY_SYSTEM_DEFAULT,
false
};
rmw_qos_profile_t profile = rmw_qos_profile_default;
profile.depth = 5;
profile.durability = RMW_QOS_POLICY_DURABILITY_SYSTEM_DEFAULT;
return profile;
}

namespace rviz_common
{
Expand All @@ -71,7 +70,7 @@ class RVIZ_COMMON_PUBLIC _RosTopicDisplay : public Display
public:
_RosTopicDisplay()
: rviz_ros_node_(),
qos_profile(display_default)
qos_profile(display_default_qos_profile())
{
topic_property_ = new properties::RosTopicProperty("Topic", "",
"", "", this, SLOT(updateTopic()));
Expand Down

0 comments on commit b8be03d

Please sign in to comment.