Ver código fonte

添加编译完全没有问题的脚本和使用说明

jinzhigang 3 anos atrás
pai
commit
ce6e5d6e10
4 arquivos alterados com 508 adições e 0 exclusões
  1. 104 0
      autodeploy_ok.sh
  2. 366 0
      autogen_ok.sh
  3. 22 0
      sh/IVSysMan.xml
  4. 16 0
      sh/use_OK.txt

+ 104 - 0
autodeploy_ok.sh

@@ -0,0 +1,104 @@
+PRO_DIR=`pwd`
+CONFIG_IVSysMan="IVSysMan_HAPO_1.xml"
+
+check_result=`whereis patchelf | awk '{print $2}'`
+if [ ! $check_result ];then
+    echo -e "\e[31m no found patchelf, Plz install patchelf first\e[0m"
+    exit 1
+fi
+
+app_name=(
+######driver######
+driver_lidar_rs16
+driver_gps_hcp2
+driver_can_nvidia_agx
+driver_map_trace
+driver_map_xodrload
+#driver_rpc_server
+#driver_cloud_grpc_client
+#driver_grpc_server
+#driver_rpc_server
+#driver_group_grpc_client
+
+######detection#####
+#detection_lidar_PointPillars_MultiHead
+detection_radar_delphi_esr
+detection_chassis
+
+######fusion#####
+#lidar_radar_fusion_cnn
+
+######controller######
+controller_hapo
+
+######decition######
+decition_brain_sf
+
+######tools########
+view_pointcloud
+view_gps
+#view_rawcan
+view_radar
+IVSysMan
+ivmapmake
+view_ivlog
+#tool_querymsg
+tool_xodrobj
+ivlog_record
+adciv_record
+ui_ads_hmi
+tool_configivsysman
+)
+
+for x in ${app_name[@]}
+do
+	echo "deploy $x"
+	cp ./bin/${x} ./
+	./deploy.sh $x
+	if [ $? == 1 ];then
+		echo "build $x faile"
+		exit 1
+	fi
+	rm ${x}
+done
+
+lib_name=(
+	libmodulecomm.so
+	libndt_cpu.so
+	libxmlparam.so
+	libivfault.so
+	libivlog.so
+	libplatformif.so
+	libivexit.so
+	libivchart.so
+	libivbacktrace.so
+)
+
+for x in ${lib_name[@]}
+do
+	echo "link lib $x"
+	patchelf --set-rpath '$ORIGIN' ./bin/$x
+	if [ "$?" != 0 ];then
+		echo -e "\e[31m patchelf $EXE faile, Ensure patchelf tool installed\e[0m"
+		exit 1
+	fi
+done
+
+cp ./bin/*.so ./deploy/app/lib/
+
+qt_com=`arch`
+if [ $qt_com = "aarch64" ];then
+cp -r /usr/lib/aarch64-linux-gnu/nss/* ./deploy/app/lib/
+else
+cp -r /usr/lib/x86_64-linux-gnu/nss/* ./deploy/app/lib/
+fi
+
+cp ./sh/BaiDuMap.html ./deploy/app/
+cp ./sh/car.png ./deploy/app/
+cp ./sh/asphalt.jpg ./deploy/app/
+cp ./sh/IVSysMan.xml ./deploy/app/
+
+echo ""
+echo "***************"
+echo "***  done!  ***"
+echo "***************"

+ 366 - 0
autogen_ok.sh

@@ -0,0 +1,366 @@
+#qt_com=$(arch)
+qt_com=`arch`
+if [ $qt_com = "aarch64" ];then
+qtmake="/usr/lib/aarch64-linux-gnu/qt5/bin/qmake"
+else
+qtmake="/opt/Qt5.10.1/5.10.1/gcc_64/bin/qmake"
+fi
+
+if [ $(uname -m) == "x86_64" ]; then
+    qtmake="/usr/lib/x86_64-linux-gnu/qt5/bin/qmake"
+fi
+
+if [ ! $qtmake ];then
+	echo -e "\e[33m qtmake not set, auto find it\e[0m"
+	qtmake=`find /opt -name "qmake" 2>/dev/null | grep 'gcc_64'`
+fi
+
+if [ ! $qtmake ];then
+	echo -e "\e[33m can't find qmake \e[0m"
+	exit 1
+fi
+
+echo -e "\e[33m qtmake: $qtmake \e[0m"
+
+show_error=$1
+has_error=0
+check_result()
+{
+    if [ "$build_result" != 0 -a "$show_error" == "s" ];then
+		echo -e "\e[33m*************************************************\e[0m"
+        echo -e "\e[31m    Please modify build error first,Exit!\e[0m"
+		echo -e "\e[33m*************************************************\e[0m"
+ 	    exit 1
+	fi
+}
+
+store_result()
+{
+	if [ "$build_result" != 0 ];then
+		echo -e "\e[33m*************************************************\e[0m"
+	        echo -e "\e[31m    Please modify build error first,Exit!\e[0m"
+		echo -e "\e[33m*************************************************\e[0m"
+ 		error_log="$error_log \n `pwd`"
+		has_error=1
+	fi
+}
+
+show_result()
+{
+	if [ "$has_error" != 0 ];then
+		echo -e "\e[33m*************************************************\e[0m"
+	        echo -e "\e[31mPlease modify build error first,Exit!\e[0m"
+        	echo -e "\e[31m$error_log\e[0m"
+		echo -e "\e[33m*************************************************\e[0m"
+	else
+		echo -e "\e[33m*************************************************\e[0m"
+	        echo -e "\e[31m    Build Success! \e[0m"
+		echo -e "\e[33m*************************************************\e[0m"
+	fi
+}
+MAKEOPT=-j8
+
+mkdir bin
+
+cd src/include/proto
+sh ./protomake.sh
+cd ../../../
+
+cd src/common/modulecomm/
+$qtmake modulecomm.pro
+make $MAKEOPT
+build_result=$?
+check_result $build_result
+store_result
+make clean
+cp libmodulecomm.so ./../../../bin/
+rm Makefile
+rm .qmake.stash
+cd ../../../
+
+cd src/common/xmlparam/
+$qtmake xmlparam.pro
+make $MAKEOPT
+build_result=$?
+check_result $build_result
+store_result
+make clean
+cp libxmlparam.so ./../../../bin/
+rm Makefile
+rm .qmake.stash
+cd ../../../
+
+cd src/common/ndt_cpu/
+$qtmake ndt_cpu.pro
+make $MAKEOPT
+build_result=$?
+check_result $build_result
+store_result
+make clean
+cp libndt_cpu.so ./../../../bin/
+rm Makefile
+rm .qmake.stash
+cd ../../../
+
+cd src/common/ivlog/
+$qtmake ivlog.pro
+make $MAKEOPT
+build_result=$?
+check_result $build_result
+store_result
+make clean
+cp libivlog.so ./../../../bin/
+rm Makefile
+rm .qmake.stash
+cd ../../../
+
+cd src/common/ivfault/
+$qtmake ivfault.pro
+make $MAKEOPT
+build_result=$?
+check_result $build_result
+store_result
+make clean
+cp libivfault.so ./../../../bin/
+rm Makefile
+rm .qmake.stash
+cd ../../../
+
+cd src/common/platformif/
+$qtmake platformif.pro
+make $MAKEOPT
+build_result=$?
+check_result $build_result
+store_result
+make clean
+cp libplatformif.so ./../../../bin/
+rm Makefile
+rm .qmake.stash
+cd ../../../
+
+cd src/common/ivexit/
+$qtmake ivexit.pro
+make $MAKEOPT
+build_result=$?
+check_result $build_result
+store_result
+make clean
+cp libivexit.so ./../../../bin/
+rm Makefile
+rm .qmake.stash
+cd ../../../
+
+cd src/common/ivbacktrace/
+$qtmake ivbacktrace.pro
+make $MAKEOPT
+build_result=$?
+check_result $build_result
+store_result
+make clean
+cp libivbacktrace.so ./../../../bin/
+rm Makefile
+rm .qmake.stash
+cd ../../../
+
+cd src/common/ivchart/
+$qtmake ivchart.pro
+make $MAKEOPT
+build_result=$?
+check_result $build_result
+store_result
+make clean
+cp libivchart.so ./../../../bin/
+rm Makefile
+rm .qmake.stash
+cd ../../../
+
+cd src/common/ivservice/
+$qtmake ivservice.pro
+make $MAKEOPT
+build_result=$?
+check_result $build_result
+store_result
+make clean
+cp libivservice.so ./../../../bin/
+rm Makefile
+rm .qmake.stash
+cd ../../../
+
+
+cd src/common/makeprotointerface/
+$qtmake makeprotointerface.pro
+make $MAKEOPT
+build_result=$?
+check_result $build_result
+store_result
+make clean
+cp makeprotointerface ./../../../bin/
+rm Makefile
+rm .qmake.stash
+cd ../../../
+
+controller_app_name=(
+    controller_hapo
+)
+
+for x in ${controller_app_name[@]}
+do
+	cd src/controller/${x}/
+	$qtmake ${x}.pro
+	make $MAKEOPT
+	build_result=$?
+	check_result $build_result
+	store_result
+	make clean
+	cp ${x} ./../../../bin/
+	rm Makefile
+	rm .qmake.stash
+	rm ${x}
+	cd ../../../
+done
+decition_app_name=(
+	decition_brain_sf
+	#decition_brain_ge3
+	#decition_brain_qingyuan
+	#decition_brain_vv7
+)
+
+for x in ${decition_app_name[@]}
+do
+	cd src/decition/${x}/
+	$qtmake ${x}.pro
+	make $MAKEOPT
+	build_result=$?
+	check_result $build_result
+	store_result
+	make clean
+	cp ${x} ./../../../bin/
+	rm Makefile
+	rm .qmake.stash
+	rm ${x}
+	cd ../../../
+done
+
+driver_app_name=(
+	driver_lidar_rs16
+	driver_gps_hcp2
+	driver_can_nvidia_agx
+	driver_map_trace
+	driver_map_xodrload
+#	driver_rpc_server
+#	driver_cloud_grpc_client
+#	driver_grpc_server
+#	driver_rpc_server
+#	driver_group_grpc_client
+)
+
+for x in ${driver_app_name[@]}
+do
+	cd src/driver/${x}/
+	$qtmake ${x}.pro
+	make $MAKEOPT
+	build_result=$?
+	check_result $build_result
+	store_result
+	make clean
+	cp ${x} ./../../../bin/
+	rm Makefile
+	rm .qmake.stash
+	rm ${x}
+	cd ../../../
+done
+
+detect_app_name=(
+#	detection_lidar_PointPillars_MultiHead
+	detection_radar_delphi_esr
+	detection_chassis
+)
+
+for x in ${detect_app_name[@]}
+do
+	cd src/detection/${x}/
+	$qtmake ${x}.pro
+	make $MAKEOPT
+	build_result=$?
+	check_result $build_result
+	store_result
+	make clean
+	cp ${x} ./../../../bin/
+	rm Makefile
+	rm .qmake.stash
+	rm ${x}
+	cd ../../../
+done
+
+
+fution_app_name=(
+#	lidar_radar_fusion_cnn
+)
+
+for x in ${fution_app_name[@]}
+do
+	cd src/fusion/${x}/
+	$qtmake ${x}.pro
+	make $MAKEOPT
+	build_result=$?
+	check_result $build_result
+	store_result
+	make clean
+	cp ${x} ./../../../bin/
+	rm Makefile
+	rm .qmake.stash
+	rm ${x}
+	cd ../../../
+done
+
+tool_app_name=(
+	view_pointcloud
+	view_gps
+#	view_rawcan
+	view_radar
+	IVSysMan
+	ivmapmake
+	view_ivlog
+#	tool_querymsg
+	tool_xodrobj
+	ivlog_record
+	adciv_record
+	tool_configivsysman
+)
+
+for x in ${tool_app_name[@]}
+do
+	cd src/tool/${x}/
+	$qtmake ${x}.pro
+	make $MAKEOPT
+	build_result=$?
+	check_result $build_result
+	store_result
+	make clean
+	cp ${x} ./../../../bin/
+	rm Makefile
+	rm .qmake.stash
+	rm ${x}
+	cd ../../../
+done
+
+ui_app_name=(
+	ui_ads_hmi
+)
+
+for x in ${ui_app_name[@]}
+do
+	cd src/ui/${x}/
+	$qtmake ${x}.pro
+	make $MAKEOPT
+	build_result=$?
+	check_result $build_result
+	store_result
+	make clean
+	cp ${x} ./../../../bin/
+	rm Makefile
+	rm .qmake.stash
+	rm ${x}
+	cd ../../../
+done
+show_result

+ 22 - 0
sh/IVSysMan.xml

@@ -0,0 +1,22 @@
+<xml>
+ <setting defaultpath="/home/nvidia/code/modularization/deploy/app"/>
+ <module autostart="false" dir="" args="" app="adciv_record" group="Tool"/>
+ <module autostart="false" dir="" args="" app="controller_hapo" group="Control"/>
+ <module autostart="false" dir="" args="" app="decition_brain_sf" group="Control"/>
+ <module autostart="true" dir="" args="" app="detection_chassis" group="Detection"/>
+ <module autostart="true" dir="" args="" app="detection_radar_delphi_esr" group="Detection"/>
+ <module autostart="true" dir="" args="" app="driver_can_nvidia_agx" group="Driver"/>
+ <module autostart="true" dir="" args="" app="driver_gps_hcp2" group="Driver"/>
+ <module autostart="true" dir="" args="" app="driver_lidar_rs16" group="Driver"/>
+ <module autostart="false" dir="" args="" app="driver_map_trace" group="Driver"/>
+ <module autostart="false" dir="" args="" app="driver_map_xodrload" group="Driver"/>
+ <module autostart="false" dir="" args="" app="ivlog_record" group="Tool"/>
+ <module autostart="false" dir="" args="" app="ivmapmake" group="Tool"/>
+ <module autostart="false" dir="" args="" app="tool_configivsysman" group="Tool"/>
+ <module autostart="false" dir="" args="" app="tool_xodrobj" group="Tool"/>
+ <module autostart="true" dir="" args="" app="ui_ads_hmi" group="Tool"/>
+ <module autostart="false" dir="" args="" app="view_gps" group="Tool"/>
+ <module autostart="false" dir="" args="" app="view_ivlog" group="Tool"/>
+ <module autostart="false" dir="" args="" app="view_pointcloud" group="Tool"/>
+ <module autostart="false" dir="" args="" app="view_radar" group="Tool"/>
+</xml>

+ 16 - 0
sh/use_OK.txt

@@ -0,0 +1,16 @@
+1、首先在git上克隆代码,终端下执行如下命令:
+cd ~
+mkdir code
+cd code
+git clone http://111.33.136.149:3000/adc_pilot/modularization.git
+
+2、在modularization/include/common.pri里第一行加上如下内容:
+DEFINES += MODULECOMM_NO_FASTRTPS
+
+3、依次执行如下内容:
+cd ~/code/momodularization
+./autogen_lib.sh
+./autogen_ok.sh s
+./autodeploy_ok.sh
+
+4、鼠标打开~/code/momodularization/deploy/app下的IVSysMan。