3 #include "../shape_shifter_factory.hpp" 4 #include "../qnodedialog.h" 40 _log_window->setWindowFlags( flags | Qt::SubWindow );
49 _log_window->restoreGeometry(settings.value(
"RosoutPublisher.geometry").toByteArray());
66 settings.setValue(
"RosoutPublisher.geometry",
_log_window->saveGeometry());
82 std::vector<const PlotDataAny*> logs_timeseries;
86 const std::string& topic_name = data_it.first;
90 if( ! registered_shapeshifted_msg )
100 logs_timeseries.push_back( &data_it.second );
103 return logs_timeseries;
110 std::vector<rosgraph_msgs::LogConstPtr> logs;
114 for(
const PlotDataAny* type_erased_logs: logs_timeseries )
116 const int first_index = type_erased_logs->getIndexFromX( threshold_time );
118 if( first_index != -1)
120 for(
int i=first_index;
i< type_erased_logs->size();
i++)
122 const auto& any_msg = type_erased_logs->at(
i);
125 const bool isRawBuffer = any_value.
type() ==
typeid( std::vector<uint8_t>);
127 std::vector<uint8_t> raw_buffer;
132 else if( isRosbagMessage ){
134 raw_buffer.resize( msg_instance.
size() );
136 msg_instance.
write(stream);
142 rosgraph_msgs::LogPtr p(boost::make_shared<rosgraph_msgs::Log>());
146 int64_t usec = p->header.stamp.toNSec() / 1000;
150 if( usec >= threshold_time){
156 std::sort( logs.begin(), logs.end(),
157 [](
const rosgraph_msgs::LogConstPtr&
a,
const rosgraph_msgs::LogConstPtr&
b)
159 return a->header.stamp <
b->header.stamp;
172 using namespace std::chrono;
ValueType any_cast(any const &operand)
std::vector< const PlotDataAny * > findRosoutTimeseries()
std::chrono::high_resolution_clock::time_point TimePoint
RosoutWindow * _log_window
void timeRangeChanged(TimePoint time_min, TimePoint time_max)
static RosIntrospectionFactory & get()
virtual void updateState(double current_time) override
int64_t _minimum_time_usec
std::unordered_map< std::string, PlotDataAny > user_defined
std::string const & getMD5Sum() const
LogsTableModel * _tablemodel
virtual bool enabled() const override
virtual void setEnabled(bool enabled) override
const PlotDataMapRef * _datamap
int64_t _maximum_time_usec
void syncWithTableModel(const std::vector< const PlotDataAny * > &logs_timeseries)
virtual ~RosoutPublisher()
static RosIntrospection::ShapeShifter * getShapeShifter(const std::string &topic_name)
void push_back(const rosgraph_msgs::Log::ConstPtr &pushed_log)
const std::type_info & type() const any_noexcept
void deserialize(Stream &stream, T &t)
void write(Stream &stream) const
virtual void setEnabled(bool enabled)