apollo icon indicating copy to clipboard operation
apollo copied to clipboard

Is there an interface in dreamview plus that can display the vehicle SOC on the page?

Open leizi111 opened this issue 1 year ago • 4 comments

I want to display the vehicle soc value on the dreamview plus page, is there an interface in dreamview plus that can display the vehicle SOC on the page?

leizi111 avatar Aug 15 '24 03:08 leizi111

do you mean Vehicle Security Operations Center? Dreamview already has an event monitor to display multi-level messages about the module, like warning, error, delay so on.

we're adding more functional security monitor, and maybe you can explain your requirements in detail, or give a design document

daohu527 avatar Aug 15 '24 06:08 daohu527

I mean soc(State-of-Charge) value of vehicle battery, it can be read on the chassis via canbus, I want to display it on dreamview plus page, is there an interface I can use? Looking forward to your reply.

do you mean Vehicle Security Operations Center? Dreamview already has an event monitor to display multi-level messages about the module, like warning, error, delay so on.

we're adding more functional security monitor, and maybe you can explain your requirements in detail, or give a design document

leizi111 avatar Aug 15 '24 06:08 leizi111

autoDrivingCar

Vehicle related information is in autoDrivingCar, which is a Object message, the proto type you can find in https://github.com/ApolloAuto/apollo/blob/0026d7ee9ebdb772818c741e6b9220f9412a94ff/modules/common_msgs/dreamview_msgs/simulation_world.proto#L77

how to get the battery_percentage

  1. Here is an example about how to get speed. https://github.com/ApolloAuto/apollo/blob/0026d7ee9ebdb772818c741e6b9220f9412a94ff/modules/dreamview_plus/frontend/packages/dreamview-core/src/components/panels/DashBoard/index.tsx#L71-L77

so you can add below method to get battery_percentage,

            <SignalAndGear
                color={dashBoardState?.trafficSignal?.currentSignal}
                gearPosition={dashBoardState?.autoDrivingCar?.gearLocation}
                batteryPercentage={dashBoardState?.autoDrivingCar?.batteryPercentage}  #-------> add
            />
  1. Next, display info in below code https://github.com/ApolloAuto/apollo/blob/0026d7ee9ebdb772818c741e6b9220f9412a94ff/modules/dreamview_plus/frontend/packages/dreamview-core/src/components/panels/DashBoard/SignalAndGear/index.tsx#L12-L21
    <div className={classes['dash-board-signal-gear']}>
        <Signal signal={props?.color as SignalEnum} />
        <Gear gearPosition={props?.gearPosition} />
        <Battery percentage={props?.batteryPercentage} />  #-------> add
    </div>

daohu527 avatar Aug 22 '24 08:08 daohu527

Thanks for your reply! I will try it in my project.

leizi111 avatar Aug 26 '24 02:08 leizi111

Thanks for your reply! I will try it in my project.

您好,请问您改完以后有生效吗,我刷新了网页后还是和原来一样

1012327963 avatar Nov 27 '24 03:11 1012327963

Thanks for your reply! I will try it in my project.

您好,请问您改完以后有生效吗,我刷新了网页后还是和原来一样

最近在忙别的事,按我的理解改完需要编译dreamview_plus的前端代码才会生效

leizi111 avatar Nov 28 '24 07:11 leizi111

Thanks for your reply! I will try it in my project.

您好,请问您改完以后有生效吗,我刷新了网页后还是和原来一样

最近在忙别的事,按我的理解改完需要编译dreamview_plus的前端代码才会生效

我这边已经显示出来了,除了上述的修改,还需要新建两个对应的文件 以及需要去看懂前端的dreamview_proto_bundle 就可以去把他显现出来

1012327963 avatar Dec 12 '24 01:12 1012327963