jsk_recognition_msgs/BoundingBoxArray Message

这篇博客详细介绍了ROS中`jsk_recognition_msgs/BoundingBoxArrayMessage`的消息类型,它是用于表示一组边界框的数据结构。`BoundingBoxArray`包含一个`Header`和一个`BoundingBox`数组,方便在rviz中进行可视化。这个消息类型在机器人定位、目标检测等领域有着广泛应用。

jsk_recognition_msgs/BoundingBoxArray Message

File: jsk_recognition_msgs/BoundingBoxArray.msg
Raw Message Definition

BoundingBoxArray is a list of BoundingBox.
You can use jsk_rviz_plugins to visualize BoungingBoxArray on rviz.
Header header
BoundingBox[] boxes

Compact Message Definition

std_msgs/Header header
jsk_recognition_msgs/BoundingBox[] boxes

#ifndef ARS_RADAR_H_ #define ARS_RADAR_H_ #include <ros/ros.h> #include <string> #include <vector> #include <thread> //#include"gps_msgs/gpsUtm.h" #include <can_msgs/Object.h> #include <can_msgs/ObjectArray.h> #include <can_msgs/FrameArray.h> #include <jsk_recognition_msgs/BoundingBox.h> #include <jsk_recognition_msgs/BoundingBoxArray.h> #include <pcl/point_cloud.h> #include <pcl_conversions/pcl_conversions.h> #include <sensor_msgs/PointCloud2.h> #include <diagnostic_msgs/DiagnosticStatus.h> #include <cmath> #include <unordered_map> class ArsRadar { public: ArsRadar(); ~ArsRadar(){ pthread_rwlock_destroy(&egoSpeedLock); pthread_rwlock_destroy(&countLock); }; bool init(); void run(); private: void sendMsgToArs(const ros::TimerEvent&); void configArs(const ros::TimerEvent&); void canMsg_callback(const can_msgs::FrameArray::ConstPtr& msg); //void gps_callback(const gps_msgs::gpsUtm::ConstPtr& msg); void parse_msg(const can_msgs::Frame &frame, int index, int n); void pubBoundingBoxArray(); enum Cluster_DynProp { Target_Move = 0, //移动 Target_Static = 1, //静止 Target_Come = 2, //来向 Target_May_Static = 3, //可能静止 Target_Unknow = 4, //未知 Target_Across = 5, //横穿 Target_Across_Static = 6, //横穿静止 Target_Stop = 7 //停止 }; typedef struct _Info { std::string type; uint8_t r; uint8_t g; uint8_t b; _Info(const std::string& t, uint8_t _r, uint8_t _g, uint8_t _b) { type = t; r = _r; g = _g; b = _b; } }Info; std::vector<Info> Infos; private: ros::Subscriber sub_can_; // 订阅can分析仪消息 ros::Subscriber sub_gps_; ros::Publisher pub_can_; // 向can分析仪发布消息 ros::Publisher pub_can_config; // 向can分析仪发布配置消息 ros::Publisher pub_object_; // 发布离我最近的障碍物消息 ros::Publisher pub_objects_; // 发布所有障碍物消息 ros::Publisher pub_cloud_; // 发布点云消息 pcl::PointCloud<pcl::PointXYZRGB> cloud; pcl::PointXYZRGB point; sensor_msgs::PointCloud2 output; std::string from_can_topic_; std::string to_can_topic_; std::string gpsUtm_topic; can_msgs::ObjectArray ars_objects_; can_msgs::Object ars_object_; can_msgs::Object ars_object_car; bool is_sendMsgToArs_; ros::Timer timer_1, timer_2; std::unordered_map<int, int> MapObjectId2indexInObjectArray; double egoSpeed; // m/s double yawRate; // deg/s pthread_rwlock_t egoSpeedLock, countLock; int readCount; }; #endif 跟据以上代码推出gps_msgs/gpsUtm.h的头文件代码
03-30
rosai@rosai-virtual-machine:~/autoware.ai$ colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release Starting >>> autoware_build_flags Starting >>> autoware_msgs Starting >>> vector_map_msgs Starting >>> mrt_cmake_modules Finished <<< autoware_build_flags [4.57s] Starting >>> autoware_config_msgs Finished <<< mrt_cmake_modules [4.79s] Starting >>> lanelet2_core [Processing: autoware_config_msgs, autoware_msgs, lanelet2_core, vector_map_msgs] [Processing: autoware_config_msgs, autoware_msgs, lanelet2_core, vector_map_msgs] Finished <<< autoware_config_msgs [1min 7s] Starting >>> ros_observer Finished <<< autoware_msgs [1min 22s] Starting >>> amathutils_lib Finished <<< vector_map_msgs [1min 24s] Starting >>> vector_map [Processing: amathutils_lib, lanelet2_core, ros_observer, vector_map] Finished <<< ros_observer [46.7s] Starting >>> autoware_system_msgs Finished <<< autoware_system_msgs [16.3s] Starting >>> autoware_can_msgs Finished <<< vector_map [51.2s] Starting >>> vector_map_server Finished <<< autoware_can_msgs [10.2s] Starting >>> autoware_lanelet2_msgs Finished <<< autoware_lanelet2_msgs [8.50s] Starting >>> autoware_health_checker --- stderr: autoware_health_checker CMake Error at /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:83 (find_package): Could not find a package configuration file provided by "jsk_rviz_plugins" with any of the following names: jsk_rviz_pluginsConfig.cmake jsk_rviz_plugins-config.cmake Add the installation prefix of "jsk_rviz_plugins" to CMAKE_PREFIX_PATH or set "jsk_rviz_plugins_DIR" to a directory containing one of the above files. If "jsk_rviz_plugins" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): CMakeLists.txt:6 (find_package) --- Failed <<< autoware_health_checker [3.83s, exited with code 1] Aborted <<< lanelet2_core [2min 32s] Aborted <<< amathutils_lib [1min 19s] Aborted <<< vector_map_server [1min 12s] Summary: 10 packages finished [3min 28s] 1 package failed: autoware_health_checker 3 packages aborted: amathutils_lib lanelet2_core vector_map_server 2 packages had stderr output: autoware_health_checker vector_map_server 151 packages not processed
最新发布
11-30
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值