Apollo  6.0
Open source self driving car software
smartereye_device.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright 2020 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 
17 #pragma once
18 
19 #include <math.h>
20 #include <stdio.h>
21 
22 #include <iostream>
23 #include <memory>
24 #include <sstream>
25 #include <string>
26 
27 #include "cyber/cyber.h"
28 #include "modules/drivers/smartereye/proto/config.pb.h"
30 #include "third_party/camera_library/smartereye/include/LdwDataInterface.h"
31 #include "third_party/camera_library/smartereye/include/calibrationparams.h"
32 #include "third_party/camera_library/smartereye/include/camerahandler.h"
33 #include "third_party/camera_library/smartereye/include/disparityconvertor.h"
34 #include "third_party/camera_library/smartereye/include/frameid.h"
35 #include "third_party/camera_library/smartereye/include/obstacleData.h"
36 #include "third_party/camera_library/smartereye/include/rotationmatrix.h"
37 #include "third_party/camera_library/smartereye/include/satpext.h"
38 #include "third_party/camera_library/smartereye/include/stereocamera.h"
39 #include "third_party/camera_library/smartereye/include/taskiddef.h"
40 
41 namespace apollo {
42 namespace drivers {
43 namespace smartereye {
44 
45 using apollo::drivers::smartereye::config::Config;
46 
48  public:
50  virtual ~SmartereyeDevice();
51  virtual bool init(const std::shared_ptr<Config> &camera_config);
52  bool is_capturing();
53  bool wait_for_device();
54  int uninit();
55  bool SetCallback(CallbackFunc ptr);
56  int poll();
57 
58  private:
59  bool is_capturing_ = false;
60  bool inited_ = false;
61  std::shared_ptr<Config> config_;
62  StereoCamera *pcamera_ = nullptr;
63  SmartereyeHandler *pcameraHandler_ = nullptr;
64 };
65 
66 } // namespace smartereye
67 } // namespace drivers
68 } // namespace apollo
virtual bool init(const std::shared_ptr< Config > &camera_config)
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
Definition: smartereye_device.h:47
Definition: smartereye_handler.h:34
std::function< bool(RawImageFrame *rawFrame)> CallbackFunc
Definition: smartereye_handler.h:32