Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/Object_Tracking_Planning/README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
这是一个关于利用yolov3和carla模拟器进行·自主车辆目标检测与轨迹规划,与模拟器相结合,以提升车辆的感知与决策能力。

43 changes: 43 additions & 0 deletions src/Object_Tracking_Planning/carla_yolo_ros/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
cmake_minimum_required(VERSION 3.0.2)
project(carla_yolo_ros)

find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
std_msgs
sensor_msgs
geometry_msgs
nav_msgs
visualization_msgs
cv_bridge
image_transport
tf
)

catkin_package(
CATKIN_DEPENDS
roscpp
rospy
std_msgs
sensor_msgs
geometry_msgs
nav_msgs
visualization_msgs
cv_bridge
image_transport
tf
)

catkin_install_python(PROGRAMS
scripts/carla_ros_bridge.py
scripts/test_image_publisher.py
scripts/teleop_keyboard.py
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)

install(DIRECTORY
launch
config
models
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version='1.0' encoding='utf-8'?>
<qtgui>
<perspective>
<mainwindow>
<toolbars>
<toolbar area="2">
<action name="Action 1">
<icon>help</icon>
<text>Help</text>
</action>
</toolbar>
</toolbars>
</mainwindow>
<docks>
<dock name="Topic Monitor" area="1">
<widget class="rqt_topic.topic_plugin.TopicPlugin" package="rqt_topic">
<topic>/carla/status</topic>
</widget>
</dock>
<dock name="Image View" area="5">
<widget class="rqt_image_view.image_view.ImageView" package="rqt_image_view" />
</dock>
<dock name="Console" area="4">
<widget class="rqt_console.console.Console" package="rqt_console" />
</dock>
</docks>
</perspective>
</qtgui>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
carla_host: "127.0.0.1"
carla_port: 2000
yolo_confidence_threshold: 0.5
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?xml version="1.0"?>
<launch>
<!-- CARLA ROS Bridge节点 -->
<node pkg="carla_yolo_ros" type="carla_ros_bridge.py" name="carla_bridge" output="screen">
<!-- 仿真模式: ros_only, carla_only, hybrid -->
<param name="simulation_mode" value="ros_only" />
<param name="publish_rate" value="10.0" />

<!-- CARLA连接参数 -->
<param name="carla_host" value="127.0.0.1" />
<param name="carla_port" value="2000" />
<param name="carla_timeout" value="10.0" />
<param name="synchronous_mode" value="false" />
<param name="fixed_delta_seconds" value="0.05" />
</node>

<!-- 测试图像发布器 -->
<node pkg="carla_yolo_ros" type="test_image_publisher.py" name="test_image_publisher" output="screen">
<param name="publish_rate" value="5.0" />
<param name="width" value="640" />
<param name="height" value="480" />
</node>

<!-- 键盘遥操作 -->
<node pkg="carla_yolo_ros" type="teleop_keyboard.py" name="teleop_keyboard" output="screen" launch-prefix="xterm -e">
<param name="linear_speed" value="0.5" />
<param name="angular_speed" value="0.5" />
</node>

<!-- RQT图像查看器 -->
<node pkg="rqt_image_view" type="rqt_image_view" name="rqt_image_view" args="/carla/detection_image" />

<!-- RQT多功能GUI -->
<node pkg="rqt_gui" type="rqt_gui" name="rqt_gui" args="--perspective-file $(find carla_yolo_ros)/config/carla.perspective" />
</launch>
80 changes: 80 additions & 0 deletions src/Object_Tracking_Planning/carla_yolo_ros/models/coco.names
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
person
bicycle
car
motorcycle
airplane
bus
train
truck
boat
traffic light
fire hydrant
stop sign
parking meter
bench
bird
cat
dog
horse
sheep
cow
elephant
bear
zebra
giraffe
backpack
umbrella
handbag
tie
suitcase
frisbee
skis
snowboard
sports ball
kite
baseball bat
baseball glove
skateboard
surfboard
tennis racket
bottle
wine glass
cup
fork
knife
spoon
bowl
banana
apple
sandwich
orange
broccoli
carrot
hot dog
pizza
donut
cake
chair
couch
potted plant
bed
dining table
toilet
tv
laptop
mouse
remote
keyboard
cell phone
microwave
oven
toaster
sink
refrigerator
book
clock
vase
scissors
teddy bear
hair drier
toothbrush
Loading
Loading