-
Notifications
You must be signed in to change notification settings - Fork 258
Compressed Image Display #1288
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
Open
mjforan
wants to merge
25
commits into
ros2:rolling
Choose a base branch
from
mjforan:compressed-image-display
base: rolling
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Compressed Image Display #1288
Changes from 23 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
188eb92
first draft and devcontainer
mjforan d2e3289
devcontainer working, compressed image working
mjforan 3f3296d
topic-multi property working (segfaults on close)
mjforan f8bb97e
remove image transport plugins as dependency
mjforan 5928cd9
segfault was not my fault
mjforan fcdf022
minor cleanup and comments
mjforan ef95ae8
code style
mjforan 0becd68
add other image types
mjforan 64d0ef4
remove docker stuff
mjforan b658026
update README
mjforan 5d7eebc
remove unnecessary cast
mjforan 752fa43
property to override transport, make sure transport is installed bef…
mjforan b1638dc
fix build server compilation error
mjforan 7063d9f
fix duplicate transport override items
mjforan 60a69d2
use custom QoS
mjforan 0bc298d
combine image_transport_display and image_display
mjforan 40711b7
add test for compressed image display
mjforan 287e57a
remove duplicate image texture
mjforan 76559ad
address code review
mjforan 35cb8de
revert header changes
mjforan 6c70ede
remove extra dependency
mjforan dc6d160
Merge branch 'rolling' into compressed-image-display
mjforan c02e295
Merge remote-tracking branch 'origin/rolling' into compressed-image-d…
ahcorde 3aa1332
Merge branch 'rolling' into compressed-image-display
mjforan a37c3c4
Update deprecated function calls
mjforan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
85 changes: 85 additions & 0 deletions
85
rviz_common/include/rviz_common/properties/ros_topic_multi_property.hpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
// Copyright (c) 2012, Willow Garage, Inc. | ||
// All rights reserved. | ||
// | ||
// Redistribution and use in source and binary forms, with or without | ||
// modification, are permitted provided that the following conditions are met: | ||
// | ||
// * Redistributions of source code must retain the above copyright | ||
// notice, this list of conditions and the following disclaimer. | ||
// | ||
// * Redistributions in binary form must reproduce the above copyright | ||
// notice, this list of conditions and the following disclaimer in the | ||
// documentation and/or other materials provided with the distribution. | ||
// | ||
// * Neither the name of the copyright holder nor the names of its | ||
// contributors may be used to endorse or promote products derived from | ||
// this software without specific prior written permission. | ||
// | ||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE | ||
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
// POSSIBILITY OF SUCH DAMAGE. | ||
|
||
#ifndef RVIZ_COMMON__PROPERTIES__ROS_TOPIC_MULTI_PROPERTY_HPP_ | ||
#define RVIZ_COMMON__PROPERTIES__ROS_TOPIC_MULTI_PROPERTY_HPP_ | ||
|
||
#include <QString> | ||
|
||
#include <string> | ||
#include <vector> | ||
|
||
#include "rviz_common/properties/ros_topic_property.hpp" | ||
#include "rviz_common/ros_integration/ros_node_abstraction_iface.hpp" | ||
#include "rviz_common/visibility_control.hpp" | ||
|
||
namespace rviz_common | ||
{ | ||
namespace properties | ||
{ | ||
|
||
// Like RosTopicProperty but can accept multiple message types | ||
class RVIZ_COMMON_PUBLIC RosTopicMultiProperty : public RosTopicProperty | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
explicit RosTopicMultiProperty( | ||
const QString & name = QString(), const QString & default_value = QString(), | ||
const std::vector<QString> & message_types = std::vector<QString>(), | ||
const QString & description = QString(), Property * parent = nullptr, | ||
const char * changed_slot = nullptr, QObject * receiver = nullptr) | ||
: RosTopicProperty(name, default_value, "", description, parent, changed_slot, receiver), | ||
message_types_(message_types) | ||
{ | ||
} | ||
|
||
void setMessageTypes(const std::vector<QString> & message_types) | ||
{ | ||
message_types_ = message_types; | ||
} | ||
|
||
std::vector<QString> getMessageTypes() const {return message_types_;} | ||
|
||
protected Q_SLOTS: | ||
void fillTopicList() override; | ||
|
||
private: | ||
// Hide the parent class methods which only take a single type | ||
using RosTopicProperty::getMessageType; | ||
using RosTopicProperty::setMessageType; | ||
|
||
// Instead of one message type, store a list of allowed types | ||
std::vector<QString> message_types_; | ||
}; | ||
|
||
} // end namespace properties | ||
} // end namespace rviz_common | ||
|
||
#endif // RVIZ_COMMON__PROPERTIES__ROS_TOPIC_MULTI_PROPERTY_HPP_ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
rviz_common/src/rviz_common/properties/ros_topic_multi_property.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
// Copyright (c) 2012, Willow Garage, Inc. | ||
// All rights reserved. | ||
// | ||
// Redistribution and use in source and binary forms, with or without | ||
// modification, are permitted provided that the following conditions are met: | ||
// | ||
// * Redistributions of source code must retain the above copyright | ||
// notice, this list of conditions and the following disclaimer. | ||
// | ||
// * Redistributions in binary form must reproduce the above copyright | ||
// notice, this list of conditions and the following disclaimer in the | ||
// documentation and/or other materials provided with the distribution. | ||
// | ||
// * Neither the name of the copyright holder nor the names of its | ||
// contributors may be used to endorse or promote products derived from | ||
// this software without specific prior written permission. | ||
// | ||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE | ||
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
// POSSIBILITY OF SUCH DAMAGE. | ||
|
||
#include "rviz_common/properties/ros_topic_multi_property.hpp" | ||
|
||
#include <QApplication> // NOLINT: cpplint can't handle Qt imports | ||
#include <algorithm> | ||
#include <map> | ||
#include <string> | ||
#include <vector> | ||
|
||
#include "rviz_common/ros_integration/ros_node_abstraction_iface.hpp" | ||
|
||
namespace rviz_common | ||
{ | ||
namespace properties | ||
{ | ||
|
||
void RosTopicMultiProperty::fillTopicList() | ||
{ | ||
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); | ||
clearOptions(); | ||
|
||
std::map<std::string, std::vector<std::string>> published_topics = | ||
mjforan marked this conversation as resolved.
Show resolved
Hide resolved
|
||
rviz_ros_node_.lock()->get_topic_names_and_types(); | ||
|
||
for (const auto & topic : published_topics) { | ||
// Only add topics whose type matches. | ||
for (const auto & type : topic.second) { | ||
if ( | ||
std::find(message_types_.begin(), message_types_.end(), QString::fromStdString(type)) != | ||
message_types_.end()) | ||
{ | ||
addOptionStd(topic.first); | ||
} | ||
} | ||
} | ||
sortOptions(); | ||
QApplication::restoreOverrideCursor(); | ||
} | ||
|
||
} // end namespace properties | ||
} // end namespace rviz_common |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.