Commit d6f5d7a2 authored by oscar's avatar oscar

上传发送逻辑修改

parent a90424a5
......@@ -2,8 +2,8 @@ cmake_minimum_required(VERSION 2.6)
project(jfx_node_ros)
#set(CMAKE_BUILD_TYPE Debug)
SET(CMAKE_BUILD_TYPE "Release")
set(CMAKE_BUILD_TYPE Debug)
#SET(CMAKE_BUILD_TYPE "Release")
SET(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -Wall -g -ggdb")
SET(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O2 -Wall")
......@@ -11,6 +11,10 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -Wall -Ofast -pthread -Wfatal
set(JFX_COMMON_LIBS_PATH ${PROJECT_SOURCE_DIR}/../jfx_common_libs)
find_package(PCL REQUIRED)
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
find_package(catkin REQUIRED COMPONENTS
roscpp
......@@ -26,7 +30,13 @@ find_package(catkin REQUIRED COMPONENTS
)
catkin_package(
CATKIN_DEPENDS roscpp rospy std_msgs jfx_common_msgs
CATKIN_DEPENDS
roscpp
rospy
std_msgs
jfx_common_msgs
#image_transport
#cv_bridge
)
#set(CMAKE_CXX_STANDARD 14)
......@@ -61,12 +71,15 @@ include_directories(
#add_executable(yolov5 ${PROJECT_SOURCE_DIR}/yolov5.cpp)
add_executable(${PROJECT_NAME}
${PROJECT_SOURCE_DIR}/src/main.cpp
${PROJECT_SOURCE_DIR}/src/SendRosMsg.cpp
)
target_link_libraries(${PROJECT_NAME} ${OpenCV_LIBS})
#target_link_libraries(${PROJECT_NAME} ${PCL_COMMON_LIBRARIES} ${PCL_IO_LIBRARIES})
target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES})
target_link_libraries(${PROJECT_NAME} ${PCL_LIBRARIES})
target_link_libraries(${PROJECT_NAME} yaml-cpp)
add_dependencies(${PROJECT_NAME} jfx_common_msgs_gencpp)
install(TARGETS
${PROJECT_NAME}
......
<launch>
<arg name="parampath" default="$(find jfx_node_ros)/config/params.yaml"/>
<arg name="run_mode" default="1"/>
<arg name="originDataPath" default="/media/sf_originData/data"/>
<arg name="gps_load_file" default="/media/sf_originData/102022041610.nav/102022041610_traj.txt"/>
<arg name="outPutSaveDir" default="/media/sf_originData/detect_data/"/>
<arg name="playDetectTxt" default="/media/sf_originData/detect_data/detect_gps_7.txt"/>
<arg name="pcdFileFolder" default="/media/sf_pcd_image/mesh"/>
<arg name="image0FileFolder" default="/media/sf_pcd_image/102022041610/image0"/>
<arg name="image1FileFolder" default="/media/sf_pcd_image/102022041610/image1"/>
<arg name="send_pcd" default="1"/>
<arg name="send_image" default="1"/>
<node pkg="jfx_node_ros" type="jfx_node_ros" name="jfx_node_ros" output="screen" >
<param name="parampath" value="$(arg parampath)" />
<param name="run_mode" value="$(arg run_mode)" />
<param name="originDataPath" value="$(arg originDataPath)" />
<param name="gps_load_file" value="$(arg gps_load_file)" />
<param name="outPutSaveDir" value="$(arg outPutSaveDir)" />
<param name="playDetectTxt" value="$(arg playDetectTxt)" />
<param name="pcdFileFolder" value="$(arg pcdFileFolder)" />
<param name="image0FileFolder" value="$(arg image0FileFolder)" />
<param name="image1FileFolder" value="$(arg image1FileFolder)" />
<param name="send_pcd" value="$(arg send_pcd)" />
<param name="send_image" value="$(arg send_image)" />
</node>
</launch>
This diff is collapsed.
#ifndef _SEND_ROS_MSG_HPP_
#define _SEND_ROS_MSG_HPP_
#include "ros/ros.h"
#include <jsk_recognition_msgs/BoundingBoxArray.h>
#include <visualization_msgs/MarkerArray.h>
#include "jfx_common_msgs/det_tracking_array.h"
#include "jfx_common_msgs/localization.h"
#include <sensor_msgs/PointCloud2.h>
class LoadFileSendRosMsg
{
public:
LoadFileSendRosMsg() = default;
~LoadFileSendRosMsg() = default;
int Play(ros::NodeHandle& nh);
ros::Publisher m_pubFusionRes;//发送融合后的结果
ros::Publisher m_pubLocalization;//发送定位结果
ros::Publisher m_pubBoundingBoxes;//发送3D框信息
ros::Publisher m_pubMarkerArray;//发送marker框信息
ros::Publisher m_pubMarkerArrow;//发送marker框信息
ros::Publisher m_pubCloud;
};
#endif
\ No newline at end of file
This diff is collapsed.
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