• Zongmu AVM车载环视 Android SDK 简介


    点击了解纵目

    ZM AVM SDK

    Avm Android SDK目标在Android座舱域控制器(Android 平台),将以SDK的形式向客户提供,提供充足的接口来满足客户对AVM功能自定义构建,功能接口完善,开发解耦程度高,开发周期短,可帮助客户快速实现AVM产品的量产。

    AVM 软件架构

    在这里插入图片描述
    如图,java部分为客户应用。c++ 为Avm SDK实现。其中framework(非Android framework)为Avm SDK运行提供平台条件,纵目适配开发,Android Application可以交给客户实现:

    绿色部分为客户定制开发,黄色部分为sdk开发内容。在实际使用过程中,局部架构可以进行调整,

    1.代码结构

    • Avm产品从代码结构上分为Android上层App和zros动态库:(zros是zongmu内部对自身系统的称呼)
    • Android侧主要进行与客户,车机信号交互的设计开发,其中包括界面UI,car_service。
    • zros动态库主要提供Avm所需的功能组件包括环视各个视图,车模显示,盲区填充,标定等。

    1.1 Android App

    • UI: UI 包括相关view设计,按钮定义,用户操作逻辑定义。UI如果涉及到zros则通过jni向zros发送和回调。
    • car_service:主要做与车机自身can信号的接受和发送,[这块具体根据不同客户自身要求进行定义],app上层将接收到的信号通过jni层发送到zros,zros根据信号来做出相应的处理。

    1.2 zros

    zros大体包含三部分,分别为zros_model,zros_framwork,和zros_algorithm。

    • zros_model:主要提供avm基础的功能,包含各个视图,以及和Android上层App交互的功能入口,这部份zongmu可以提供参考代码协助客户自行开发。其中涉及到接口主要由zros_framework和zros_algorithm来提供。

    • zros_framework:主要提供zros在各个硬件平台上运行的基础环境和核心功能接口,其中就包括图像资源的输入和输出。

    • zros_algorithm:为zongmu算法模块,其中包含3D图像的处理,视图模型的加载渲染,标定等功能,它主要通过zros_framework和zros_model进行数据的输入输出。

    2. Avm 接口概况(native层)

    zros_ui interface:

    // 功能接口
    class SurroundViewUI
    {
    public:
    	SurroundViewUI();
    	~SurroundViewUI();
    	bool Init(DisplayConfig config);
    	void Deinit();
    	void Resume();
    	void Suspend();
    	bool TouchInput(int action, float x, float y)
    	void SetScreenSize(int width, int height);
    	void SetScreenRatio(int num, float ratio[]);
    	void onOrientationChanged(int screenDirection);
    	void SetCarResources(const std::string &car_type, const std::string &sub_car_type, const std::string &car_body_color, const std::string &resources_path);
    	void SetTouchEvent(int action, std::vector<std::pair<int, int>>posxy);
    	void SetAutomaticCalibration(); //need callback
    	void SetRadarAlertDrawable(int area, int state);
    	void SetRadarAlertEnable(int enable);
    	void SetCarDynamicShadowEnable(int enable);
    	void SetCarColor(int car_color);
    	void SetTrajVisible(int traj_type, int visible);
    	void SetAvmView(int viewId);
    	void GrantAuthorization(const std::string &car_info);
    }
    
    // 图像输入输出接口
    class viewIO{
    public:
    	bool InitCamera(CameraConfig config);
    	void DeinitCamera();	
    	bool FillCameraFrameNv21FourInOne(void *data); //支持Android  Camera2从App 层获取camera数据
    	bool RenderOneFrame();	
    
    }
    //车机信号输入输出接口
    class VehicleSignal{
    public:
    	void SetVehicleDoorStatus(int doorIndex, int status);
    	void SetVehicleDirection(int direction);
    	void SetVehicleWheelPulse(int wheelSpeedPulse[], int cnt);
    	void SetVehicleSteerAngle(float steerAngle);
    	int GetVehicleMaxSteerAngle();
    	void SetVehicleSpeed(float vehicleSpeed);
    	void SetVehicleRadarDistance(int radarDistance[], int cnt);
    	void SetCarLampStatus(int type, int status);
    	void SetVehicleGear(int gear);
    	void SetCarVisible(int visible);
    	void SetCarShininess(float shininess);
    	void SetCarOpacity(float pacity);
    	void SetCarGlassOpacity(float glassOpacity);
    	void SetCarDirectionLampFlashPeriod(int period);
    	void SetCarInteriorVisible(int visible);
    	void SetCarLogoVisible(int visible);
    	void SetCarDoorRangeVisible(int visible);
    	void SetCarLicensePlateVisible(int visible);
    	void SetCarLicensePlateType(int type);
    	void SetCarLicensePlateText(const std::string &text);
    	int GetGearStatus() {return gear_status;}
    	void SetAvmLampViewSwitch(bool enable);
    	bool GetAvmLampViewSwitch();
    }
    // zros标定结果回调应用接口
    int sendCalibrationResult(int resultData);
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
  • 相关阅读:
    信创之国产浪潮电脑+统信UOS操作系统体验3:使用 visual studio code搭建Python开发环境
    [NOI2022] 众数 题解
    brew安装特定版本flow,解决问题!
    15 -- 最接近原点的 K 个点
    数据结构——栈,队列,及其结构特点应用。
    Spring核心接口InitializingBean
    nuxt.js 进行项目重构-准备工作 项目分析
    借助 Pyroscope 对 Amazon EKS 容器服务进行 Continuous Profiling 诊断应用性能
    Web3 时代 传统品牌如何玩转 NFT 营销?
    数据结构之单链表基本操作
  • 原文地址:https://blog.csdn.net/weixin_38140931/article/details/125555103