无自动驾驶核心技术解析:线控车与高精地图

需积分: 5 5 下载量 133 浏览量 更新于2024-08-05 1 收藏 3.41MB PDF 举报
"Apollo进阶课程 ② _ 开源模块讲解(上).pdf" 在自动驾驶领域,Apollo是一个备受关注的开源平台,它涉及到众多核心技术。无自动驾驶车辆的复杂性和高技术要求使得其在民用领域中具有极高的挑战性。在本课程中,将深入解析其中的一些关键组成部分。 首先,无自动驾驶车的核心之一是线控技术(by-wire)。这意味着车辆的所有操作,如转向,都是由电脑通过电子系统直接控制,而不是传统的机械连接。线控系统通过电机连接方向盘和车轮,使得电脑能够精确控制车辆行驶。 其次,无自动驾驶车辆在行驶过程中与云端保持连接是确保安全性的重要环节。车辆并不需要持续报告行驶策略,但需要实时更新其位置和行驶计划,以便在需要时获取云端支持。 高精地图是无自动驾驶技术的另一个核心要素。不同于常规的导航地图,高精地图提供了车道级别的详细信息,不仅指示出车辆所处的道路,还能精确到具体的车道。这使得无自动驾驶车辆能够准确判断应在哪条车道行驶,并提前规划路径。高精地图有助于车辆预判路况,提前应对交通标志,保证行车平稳和效率。同时,它减少了车辆在路口对信号灯状态探测的计算负担,通过精确定位信号灯,降低了全局扫描的需求。此外,高精地图还包含静态障碍物的信息,减少了车辆对这些障碍物的独立识别和处理,进一步优化了计算效率。 在定位技术方面,虽然GPS是通常的第一联想,但实际的定位原理是相对定位。GPS通过接收多个卫星信号,计算车辆相对于这些卫星的位置,从而确定车辆在全球范围内的精确位置。然而,自动驾驶车辆的定位需求远不止于此,通常还需要结合其他传感器数据,如激光雷达(LiDAR)、摄像头和惯性测量单元(IMU),实现多传感器融合定位,以提高在城市环境中的定位精度和鲁棒性。 Apollo进阶课程的开源模块讲解涵盖了无自动驾驶车的关键技术,包括线控、云端通信、高精地图和定位技术。这些技术共同构建了自动驾驶的基础架构,使得无自动驾驶车辆能够在复杂的交通环境中安全、高效地行驶。

root@in_dev_docker:/apollo# bash scripts/msf_create_lossless_map.sh /apollo/hdmap/pcd_apollo/ 50 /apollo/hdmap/ /apollo/bazel-bin WARNING: Logging before InitGoogleLogging() is written to STDERR E0715 22:08:35.399576 6436 lossless_map_creator.cc:162] num_trials = 1 Pcd folders are as follows: /apollo/hdmap/pcd_apollo/ Resolution: 0.125 Dataset: /apollo/hdmap/pcd_apollo Dataset: /apollo/hdmap/pcd_apollo/ Loaded the map configuration from: /apollo/hdmap//lossless_map/config.xml. Saved the map configuration to: /apollo/hdmap//lossless_map/config.xml. Saved the map configuration to: /apollo/hdmap//lossless_map/config.xml. E0715 22:08:35.767315 6436 lossless_map_creator.cc:264] ieout_poses = 1706 Failed to find match for field 'intensity'. Failed to find match for field 'timestamp'. E0715 22:08:35.769896 6436 velodyne_utility.cc:46] Un-organized-point-cloud E0715 22:08:35.781770 6436 lossless_map_creator.cc:275] Loaded 245443D Points at Trial: 0 Frame: 0. F0715 22:08:35.781791 6436 base_map_node_index.cc:101] Check failed: false *** Check failure stack trace: *** scripts/msf_create_lossless_map.sh: line 11: 6436 Aborted (core dumped) $APOLLO_BIN_PREFIX/modules/localization/msf/local_tool/map_creation/lossless_map_creator --use_plane_inliers_only true --pcd_folders $1 --pose_files $2 --map_folder $IN_FOLDER --zone_id $ZONE_ID --coordinate_type UTM --map_resolution_type single root@in_dev_docker:/apollo# bash scripts/msf_create_lossless_map.sh /apollo/hdmap/pcd_apollo/ 50 /apollo/hdmap/

2023-07-16 上传

在ros项目中添加发送websocket wss消息的功能,修改如下代码并在CmakeLists.txt中添加依赖,实现将serialized_data发送到wss://autopilot-test.t3go.cn:443/api/v1/vehicle/push/message/LFB1FV696M2L43840。main.cpp:#include "ros/ros.h" #include "std_msgs/String.h" #include <boost/thread/locks.hpp> #include <boost/thread/shared_mutex.hpp> #include "third_party/apollo/proto/perception/perception_obstacle.pb.h" #include "t3_perception.pb.h" apollo::perception::PerceptionObstacles perception_obstacles_; void perceptionCallback(const std_msgs::String& msg) { ROS_WARN("t3 perceptionCallback parse"); if (perception_obstacles_.ParseFromString(msg.data)) { double timestamp = perception_obstacles_.header().timestamp_sec(); ROS_INFO("t3 perceptionCallback timestamp %f count:%d", timestamp, perception_obstacles_.perception_obstacle().size()); std::string data; perception_obstacles_.SerializeToString(&data); VehData veh_data; veh_data.set_messagetype(5); veh_data.set_messagedes("PerceptionObstacles"); veh_data.set_contents(data); std::string serialized_data; veh_data.SerializeToString(&serialized_data); } else { ROS_ERROR("t3 perceptionCallback parse fail!"); } } int main(int argc, char **argv) { ros::init(argc, argv, "listener"); ros::NodeHandle n; ros::Subscriber sub = n.subscribe("/perception_node/perception_objects", 1000, perceptionCallback); ros::spin(); return 0; }CMakeLists.txt:cmake_minimum_required(VERSION 3.0.2) project(t3) find_package(catkin REQUIRED COMPONENTS roscpp rospy pcl_ros std_msgs third_party ) find_package(Protobuf REQUIRED) include_directories(${Protobuf_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR}/..) find_package(Boost REQUIRED) include_directories(${Boost_INCLUDE_DIRS}) set(ixwebsocket_INCLUDE_DIR "/usr/local/include/ixwebsocket") set(ixwebsocket_LIBRARIES "/usr/local/lib/libixwebsocket.a") include_directories(${ixwebsocket_INCLUDE_DIR}) include_directories(${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_INCLUDE_DESTINATION}/${PROJECT_NAME}) include_directories(${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_INCLUDE_DESTINATION}/smartview) catkin_package(INCLUDE_DIRS ${PROJECT_INCLUDE_DIRS} DEPENDS ${GFLAGS_LIBRARIES} ) include_directories( ${catkin_INCLUDE_DIRS} ${PROTOBUF_INCLUDE_DIR} ${PROJECT_SOURCE_DIR}/.. ) add_executable(${PROJECT_NAME}_node src/main.cpp ) add_dependencies(${PROJECT_NAME}_node ${catkin_EXPORTED_TARGETS}) target_link_libraries(${PROJECT_NAME}_node ${catkin_LIBRARIES} ${PROTOBUF_LIBRARIES} smartview_proto ) install(TARGETS ${PROJECT_NAME}_node ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION} )

2023-06-09 上传
2023-07-16 上传

帮我修改下面的代码。要求建立一次weboscket链接,链接到wss://autopilot-test.t3go.cn:443/api/v1/vehicle/push/message/LFB1FV696M2L43840,当订阅到感知话题调用perceptionCallback时,通过wss发送serialized_data:#include "ros/ros.h" #include "std_msgs/String.h" #include <boost/thread/locks.hpp> #include <boost/thread/shared_mutex.hpp> #include "third_party/apollo/proto/perception/perception_obstacle.pb.h" #include "t3_perception.pb.h" #include <iostream> #include <websocketpp/config/asio_client.hpp> #include <websocketpp/client.hpp> #include <websocketpp/common/thread.hpp> apollo::perception::PerceptionObstacles perception_obstacles_; typedef websocketpp::clientwebsocketpp::config::asio_tls_client client; void perceptionCallback(const std_msgs::String& msg) { ROS_WARN("t3 perceptionCallback parse"); if (perception_obstacles_.ParseFromString(msg.data)) { double timestamp = perception_obstacles_.header().timestamp_sec(); ROS_INFO("t3 perceptionCallback timestamp %f count:%d", timestamp, perception_obstacles_.perception_obstacle().size()); std::string data; perception_obstacles_.SerializeToString(&data); VehData veh_data; veh_data.set_messagetype(5); veh_data.set_messagedes("PerceptionObstacles"); veh_data.set_contents(data); std::string serialized_data; veh_data.SerializeToString(&serialized_data); } else { ROS_ERROR("t3 perceptionCallback parse fail!"); } } int main(int argc, char **argv) { ros::init(argc, argv, "listener"); ros::NodeHandle n; ros::Subscriber sub = n.subscribe("/perception_node/perception_objects", 1000, perceptionCallback); ros::spin(); return 0; }

2023-06-09 上传