Apollo  v5.5.0
Open source self driving car software
camera_perception_viz_message.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright 2018 The Apollo Authors. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the License);
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an AS IS BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *****************************************************************************/
16 #pragma once
17 
18 #include <memory>
19 #include <string>
20 #include <vector>
21 
22 #include "cyber/cyber.h"
23 #include "modules/common/proto/error_code.pb.h"
28 #include "modules/perception/proto/perception_obstacle.pb.h"
29 
30 namespace apollo {
31 namespace perception {
32 namespace onboard {
33 
35  public:
36  CameraPerceptionVizMessage() { type_name_ = "CameraPerceptionVizMessage"; }
37  ~CameraPerceptionVizMessage() = default;
38 
40  delete;
41 
42  std::string GetTypeName() const { return type_name_; }
43 
45  return new CameraPerceptionVizMessage;
46  }
47 
49  const std::string& camera_name, const double msg_timestamp,
50  const Eigen::Matrix4d& pose_camera_to_world,
51  const std::shared_ptr<base::Blob<uint8_t> >& image_blob,
52  const std::vector<base::ObjectPtr>& camera_objects,
53  const std::vector<base::LaneLine>& lane_objects,
54  const apollo::common::ErrorCode& error_code);
55 
56  public:
57  std::string camera_name_;
58  std::string type_name_;
59  double msg_timestamp_ = 0.0;
60 
61  Eigen::Matrix4d pose_camera_to_world_;
62  std::shared_ptr<base::Blob<uint8_t> > image_blob_;
63  std::vector<base::ObjectConstPtr> camera_objects_;
64  std::vector<base::LaneLine> lane_objects_;
65  apollo::common::ErrorCode error_code_ = apollo::common::ErrorCode::OK;
66 };
67 
68 } // namespace onboard
69 } // namespace perception
70 } // namespace apollo
CameraPerceptionVizMessage & operator=(const CameraPerceptionVizMessage &)=delete
Definition: camera_perception_viz_message.h:34
Definition: blob.h:72
std::vector< base::ObjectConstPtr > camera_objects_
Definition: camera_perception_viz_message.h:63
std::string type_name_
Definition: camera_perception_viz_message.h:58
double msg_timestamp_
Definition: camera_perception_viz_message.h:59
std::shared_ptr< base::Blob< uint8_t > > image_blob_
Definition: camera_perception_viz_message.h:62
CameraPerceptionVizMessage * New() const
Definition: camera_perception_viz_message.h:44
std::string camera_name_
Definition: camera_perception_viz_message.h:57
std::vector< base::LaneLine > lane_objects_
Definition: camera_perception_viz_message.h:64
Eigen::Matrix4d pose_camera_to_world_
Definition: camera_perception_viz_message.h:61
std::string GetTypeName() const
Definition: camera_perception_viz_message.h:42
CameraPerceptionVizMessage()
Definition: camera_perception_viz_message.h:36
apollo::common::ErrorCode error_code_
Definition: camera_perception_viz_message.h:65