Commit 1bfae737 authored by oscar's avatar oscar

提交工程配置

parent cab5f8ce
Pipeline #1075 canceled with stages
cmake_minimum_required(VERSION 2.8.3)
project(jfxmap)
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(NSIGHT OFF)
if(NSIGHT)
include_directories(/usr/local/cuda/include)
link_directories(/usr/local/cuda/lib64)
add_definitions(-D_USING_NSIGHT_)
endif()
SET(CMAKE_BUILD_TYPE "Release")
#set(CMAKE_BUILD_TYPE "Debug")
SET(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -Wall -g -ggdb")
SET(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O3 -Wall")
find_package(catkin REQUIRED
roscpp
rospy
adu_msgs
localization_msgs
hu_msgs
jc_map_ehp_msgs
jsk_recognition_msgs
tf
gnss_imu_msgs
)
catkin_package(
INCLUDE_DIRS
CATKIN_DEPENDS roscpp rospy std_msgs message_filters
DEPENDS
)
##################MapPre切图#######################
#set(local_include_directories
# offline/Core
# offline/MapPre
# offline/Public
# submodules/ajson
# submodules/shapelib
# submodules/boolinq/include/boolinq
# submodules/xxtea-c
# )
#include_directories(${local_include_directories})
#
# file(GLOB SRC_LIST
# "offline/Core/*.cpp"
# "offline/MapPre/*.cpp"
# "submodules/xxtea-c/*.c"
# )
# add_executable(map_pre_exe ${SRC_LIST})
# add_definitions(-DSTANDALONE)
# link_directories(
# /usr/local/lib
# ${PROJECT_SOURCE_DIR}/build/devel/lib
# ${PROJECT_SOURCE_DIR}/submodules/shapelib/build
# )
# target_link_libraries(map_pre_exe
# shp
# )
#####################所有业务配置############################
file(GLOB MAP_SRC_LIST
"offline/Match/*.cpp"
"offline/Core/*.cpp"
"offline/Route/*.cpp"
"offline/Utils/*.cpp"
"offline/Projects/rav4/**/*.cpp"
"offline/Projects/rav4/**/*.c"
"submodules/xxtea-c/*.c"
"offline/Projects/rav4/Main.cpp"
)
add_executable(map ${MAP_SRC_LIST})
target_include_directories(map PUBLIC
${catkin_INCLUDE_DIRS}
offline/Match
offline/Core
offline/Projects/rav4/MapInfo
offline/Projects/rav4/MapEhp
offline/Projects/rav4/Match
offline/Projects/rav4/PlanService
submodules/ajson
submodules/xxtea-c
offline/Utils
offline/Route
)
target_link_libraries(map
${catkin_LIBRARIES}
)
if(NSIGHT)
target_link_libraries(map nvToolsExt)
endif()
add_dependencies(map
adu_msgs_generate_messages_cpp
localization_msgs_generate_messages_cpp
hu_msgs_generate_messages_cpp
jc_map_msgs_generate_messages_cpp
gnss_imu_msgs_generate_messages_cpp
jc_map_ehp_msgs_generate_messages_cpp
)
#######################Install##################################
## Mark executables for installation
## See http://docs.ros.org/melodic/api/catkin/html/howto/format1/building_executables.html
install(TARGETS map
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
## Mark other files for installation (e.g. launch and bag files, etc.)
install(DIRECTORY
launch
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
install(DIRECTORY
maps
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
# jfx_map_location
创建地图模块工程 执行方法:
\ No newline at end of file 1.编译代码,在catkin_ws下执行catkin_make命令
节点间交互的接口,单独定义成了一个包。另外,所需功能单独打包到libmap.so中,并单独提供调用接口。
编译后,会生成devel/lib/jfxmap/mapper的可知性文件。
偶尔会有如下错误信息:请再执行一次catkin_make
/root/catkin_ws/devel/include/hd_map_msgs/MapDataMsgs.h:19:30: fatal error: hd_map_msgs/Road.h: No such file or directory
2.启动节点,在catkin_ws下执行roslaunch jfxmap mapper.launch
节点执行需要指定地图的位置,所以单独执行mapper会有问题。
如果需要,请按照如下方式启动:
./mapper /root/catkin_ws/src/jfxmap/ ./maps/bosch/mapconfig.json
其中,中间的jfxmap的地址需要按照实际情况修改。
<launch>
<arg name="project_path" default="$(find jfxmap)/"/>
<arg name="config_path" default="./maps/jicaai/mapconfig.json"/>
<node pkg="jfxmap" type="map" name="map" output="screen">
<param name="project_path" value="$(arg project_path)/" />
<param name="config_path" value="$(arg config_path)" />
</node>
</launch>
\ No newline at end of file
<launch>
<arg name="project_path" default="$(find jfxmap)/"/>
<arg name="config_path" default="./maps/rav4/mapconfig.json"/>
<node pkg="jfxmap" type="map" name="map" output="log">
<param name="project_path" value="$(arg project_path)/" />
<param name="config_path" value="$(arg config_path)" />
<param name="hu_frequence" value="10" />
</node>
</launch>
\ No newline at end of file
<launch>
<arg name="project_path" default="$(find jfxmap)/"/>
<arg name="config_path" default="./maps/jicaai/mapconfig.json"/>
<node pkg="jfxmap" type="mapper" name="jfxmap" output="screen">
<param name="project_path" value="$(arg project_path)/" />
<param name="config_path" value="$(arg config_path)" />
</node>
</launch>
\ No newline at end of file
cmake_minimum_required(VERSION 2.8.3)
project(jfxmap)
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
find_package(catkin REQUIRED
roscpp
rospy
adu_msgs
localization_msgs
hu_msgs
jc_map_ehp_msgs
)
catkin_package(
INCLUDE_DIRS
CATKIN_DEPENDS roscpp rospy std_msgs message_filters
DEPENDS
)
##################MapPre切图#######################
#set(local_include_directories
# offline/Core
# offline/MapPre
# offline/Public
# submodules/ajson
# submodules/shapelib
# submodules/boolinq/include/boolinq
# submodules/xxtea-c
# )
#include_directories(${local_include_directories})
#
# file(GLOB SRC_LIST
# "offline/Core/*.cpp"
# "offline/MapPre/*.cpp"
# "submodules/xxtea-c/*.c"
# )
# add_executable(map_pre_exe ${SRC_LIST})
# add_definitions(-DSTANDALONE)
# link_directories(
# /usr/local/lib
# ${PROJECT_SOURCE_DIR}/build/devel/lib
# ${PROJECT_SOURCE_DIR}/submodules/shapelib/build
# )
# target_link_libraries(map_pre_exe
# shp
# )
#####################所有业务配置############################
file(GLOB MAP_SRC_LIST
"offline/Match/*.cpp"
"offline/Core/*.cpp"
"offline/Route/*.cpp"
"offline/Utils/*.cpp"
"offline/Projects/jika/**/*.cpp"
"offline/Projects/jika/**/*.c"
"submodules/xxtea-c/*.c"
"offline/Projects/jika/Main.cpp"
)
add_executable(map ${MAP_SRC_LIST})
target_include_directories(map PUBLIC
${catkin_INCLUDE_DIRS}
offline/Match
offline/Core
offline/Projects/jika/MapInfo
offline/Projects/jika/MapEhp
offline/Projects/jika/Match
offline/Projects/jika/PlanService
submodules/ajson
submodules/xxtea-c
offline/Utils
offline/Route
)
target_link_libraries(map
${catkin_LIBRARIES}
)
add_dependencies(map
adu_msgs_generate_messages_cpp
localization_msgs_generate_messages_cpp
hu_msgs_generate_messages_cpp
jc_map_msgs_generate_messages_cpp
gnss_imu_msgs_generate_messages_cpp
jc_map_ehp_msgs_generate_messages_cpp
)
#######################Install##################################
## Mark executables for installation
## See http://docs.ros.org/melodic/api/catkin/html/howto/format1/building_executables.html
install(TARGETS map
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
## Mark other files for installation (e.g. launch and bag files, etc.)
install(DIRECTORY
launch
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
install(DIRECTORY
maps
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
<?xml version="1.0"?>
<package format="2">
<name>jfxmap</name>
<version>0.0.0</version>
<description>The jfxmap package</description>
<!-- One maintainer tag required, multiple allowed, one person per tag -->
<maintainer email="zhangshuai@juefx.com.com">zhangshuai</maintainer>
<!-- One license tag required, multiple allowed, one license per tag -->
<!-- Commonly used license strings: -->
<!-- BSD, MIT, Boost Software License, GPLv2, GPLv3, LGPLv2.1, LGPLv3 -->
<license>TODO</license>
<buildtool_depend>catkin</buildtool_depend>
<build_depend>message_generation</build_depend>
<build_depend>roscpp</build_depend>
<build_depend>rospy</build_depend>
<build_depend>std_msgs</build_depend>
<build_depend>message_filters</build_depend>
<!-- <build_depend>ins_interface_msgs</build_depend> -->
<!-- <build_depend>hd_map_msgs</build_depend> -->
<!-- <build_depend>bs_map_msgs</build_depend> -->
<!-- <build_depend>gnss_wheel_msgs</build_depend> -->
<build_depend>common</build_depend>
<build_depend>adu_msgs</build_depend>
<build_depend>gnss_imu_msgs</build_depend>
<build_depend>hu_msgs</build_depend>
<build_depend>jc_map_ehp_msgs</build_depend>
<build_depend>localization_msgs</build_depend>
<build_depend>jsk_recognition_msgs</build_depend>
<build_depend>tf</build_depend>
<build_depend>gnss_imu_msgs</build_depend>
<exec_depend>message_runtime</exec_depend>
<exec_depend>roscpp</exec_depend>
<exec_depend>rospy</exec_depend>
<exec_depend>std_msgs</exec_depend>
<exec_depend>message_filters</exec_depend>
<!-- <exec_depend>ins_interface_msgs</exec_depend> -->
<!-- <exec_depend>hd_map_msgs</exec_depend> -->
<!-- <exec_depend>gnss_wheel_msgs</exec_depend> -->
<!-- <exec_depend>bs_map_msgs</exec_depend> -->
<exec_depend>common</exec_depend>
<exec_depend>adu_msgs</exec_depend>
<exec_depend>gnss_imu_msgs</exec_depend>
<exec_depend>hu_msgs</exec_depend>
<exec_depend>jc_map_ehp_msgs</exec_depend>
<exec_depend>localization_msgs</exec_depend>
<exec_depend>jsk_recognition_msgs</exec_depend>
<exec_depend>tf</exec_depend>
<exec_depend>gnss_imu_msgs</exec_depend>
<!-- The export tag contains other, unspecified, tags -->
<export>
<!-- Other tools can request additional information be placed here -->
</export>
</package>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment