Skip to content

Commit

Permalink
Allow the MapDisplay "Update Topic" to be changed. (#517)
Browse files Browse the repository at this point in the history
The major reason for this is so that the "Update Topic"
(and more importantly the QoS profile) is saved when clicking
"Save Config" in RViz2.  The more minor reason is that a user
*might* want to use a different topic for this.  We still
auto-populate this field with <topic_name>_updates by default,
but the user can now override it.

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
  • Loading branch information
clalancette committed Mar 12, 2020
1 parent 16ad728 commit 1b61b19
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,11 @@ MapDisplay::MapDisplay()
update_topic_property_ = new rviz_common::properties::RosTopicProperty(
"Update Topic", "",
"", "Topic where updates to this map display are received. "
"Currently, this topic is read-only and will automatically be determined by the map topic. "
"If the map is received on 'map_topic', the display assumes to receive updates on "
"'map_topic_updates'.", this);
// Set the property to read only for now. Since it is not connected to any slot,
// we don't want to update it.
update_topic_property_->setReadOnly(true);
"This topic is automatically determined by the map topic. "
"If the map is received on 'map_topic', the display assumes updates are received on "
"'map_topic_updates'."
"This can be overridden in the UI by clicking on the topic and setting the desired topic.",
this, SLOT(updateMapUpdateTopic()));

update_profile_property_ = new rviz_common::properties::QosProfileProperty(
update_topic_property_, update_profile_);
Expand Down

0 comments on commit 1b61b19

Please sign in to comment.