autowarefoundation / autoware.universe

https://autowarefoundation.github.io/autoware.universe/
Apache License 2.0
943 stars 615 forks source link

motion velocity smoother generate invalid trajectory from freespace planner output: #5938

Open VRichardJP opened 8 months ago

VRichardJP commented 8 months ago

Checklist

Description

freespace_planner trajectory: image

clear; ros2 topic echo /planning/scenario_planning/parking/trajectory --once
header:
  stamp:
    sec: 1703230235
    nanosec: 694643853
  frame_id: map
points:
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3704.4996056985747
      y: 73740.54148407953
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: 0.8876844177650136
      w: 0.46045235850974725
  longitudinal_velocity_mps: -1.3888888359069824
  lateral_velocity_mps: 0.0
  acceleration_mps2: 0.0
  heading_rate_rps: 0.0
  front_wheel_angle_rad: 0.0
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3704.4930889210755
      y: 73740.55103609574
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: 0.8882163516239227
      w: 0.45942541582708296
  longitudinal_velocity_mps: -1.3888888359069824
  lateral_velocity_mps: 0.0
  acceleration_mps2: 0.0
  heading_rate_rps: 0.0
  front_wheel_angle_rad: 0.0
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3704.5292234154686
      y: 73740.50098668145
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: 0.8910379629250171
      w: 0.45392879246246953
  longitudinal_velocity_mps: -1.3888888359069824
  lateral_velocity_mps: 0.0
  acceleration_mps2: 0.0
  heading_rate_rps: 0.0
  front_wheel_angle_rad: 0.0
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3704.6058543981057
      y: 73740.39864915659
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: 0.8967777557287822
      w: 0.4424812502581874
  longitudinal_velocity_mps: -1.3888888359069824
  lateral_velocity_mps: 0.0
  acceleration_mps2: 0.0
  heading_rate_rps: 0.0
  front_wheel_angle_rad: 0.0
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3704.7277102201074
      y: 73740.24628209743
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: 0.9052569235086805
      w: 0.42486456952727764
  longitudinal_velocity_mps: -1.3888888359069824
  lateral_velocity_mps: 0.0
  acceleration_mps2: 0.0
  heading_rate_rps: 0.0
  front_wheel_angle_rad: 0.0
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3704.9064020324295
      y: 73740.04295612437
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: 0.9164490678110134
      w: 0.40015135400036395
  longitudinal_velocity_mps: -1.3888888359069824
  lateral_velocity_mps: 0.0
  acceleration_mps2: 0.0
  heading_rate_rps: 0.0
  front_wheel_angle_rad: 0.0
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3705.165521816065
      y: 73739.7834669682
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: 0.9305272170756752
      w: 0.36622274407988264
  longitudinal_velocity_mps: -1.3888888359069824
  lateral_velocity_mps: 0.0
  acceleration_mps2: 0.0
  heading_rate_rps: 0.0
  front_wheel_angle_rad: 0.0
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3705.449880334503
      y: 73739.53150303717
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: 0.939159339834257
      w: 0.3434817817615403
  longitudinal_velocity_mps: -1.3888888359069824
  lateral_velocity_mps: 0.0
  acceleration_mps2: 0.0
  heading_rate_rps: 0.0
  front_wheel_angle_rad: 0.0
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3705.771601442446
      y: 73739.26833509812
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: 0.9442615051992961
      w: 0.3291963089081647
  longitudinal_velocity_mps: -1.3888888359069824
  lateral_velocity_mps: 0.0
  acceleration_mps2: 0.0
  heading_rate_rps: 0.0
  front_wheel_angle_rad: 0.0
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3706.138446628609
      y: 73738.98108382449
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: 0.9462821738138468
      w: 0.3233419977703804
  longitudinal_velocity_mps: -1.3888888359069824
  lateral_velocity_mps: 0.0
  acceleration_mps2: 0.0
  heading_rate_rps: 0.0
  front_wheel_angle_rad: 0.0
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3706.552900716516
      y: 73738.65787578946
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: 0.9449268605550475
      w: 0.3272815732692292
  longitudinal_velocity_mps: -1.3888888359069824
  lateral_velocity_mps: 0.0
  acceleration_mps2: 0.0
  heading_rate_rps: 0.0
  front_wheel_angle_rad: 0.0
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3706.920632234853
      y: 73738.35952485062
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: 0.9398577592282547
      w: 0.3415660879221533
  longitudinal_velocity_mps: -1.3888888359069824
  lateral_velocity_mps: 0.0
  acceleration_mps2: 0.0
  heading_rate_rps: 0.0
  front_wheel_angle_rad: 0.0
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3707.244937328384
      y: 73738.07319368167
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: 0.930454372764812
      w: 0.3664077785785125
  longitudinal_velocity_mps: -1.3888888359069824
  lateral_velocity_mps: 0.0
  acceleration_mps2: 0.0
  heading_rate_rps: 0.0
  front_wheel_angle_rad: 0.0
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3707.530869050038
      y: 73737.78432798017
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: 0.914783523737298
      w: 0.4039444326869383
  longitudinal_velocity_mps: -1.3888888359069824
  lateral_velocity_mps: 0.0
  acceleration_mps2: 0.0
  heading_rate_rps: 0.0
  front_wheel_angle_rad: 0.0
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3707.7199399810484
      y: 73737.56469413692
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: 0.9026671756110062
      w: 0.4303393661686658
  longitudinal_velocity_mps: -1.3888888359069824
  lateral_velocity_mps: 0.0
  acceleration_mps2: 0.0
  heading_rate_rps: 0.0
  front_wheel_angle_rad: 0.0
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3707.8521146059106
      y: 73737.39450844904
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: 0.8931642133078084
      w: 0.44973068392788573
  longitudinal_velocity_mps: -1.3888888359069824
  lateral_velocity_mps: 0.0
  acceleration_mps2: 0.0
  heading_rate_rps: 0.0
  front_wheel_angle_rad: 0.0
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3707.940913723231
      y: 73737.27113803972
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: 0.8862120693321768
      w: 0.4632797946921289
  longitudinal_velocity_mps: -1.3888888359069824
  lateral_velocity_mps: 0.0
  acceleration_mps2: 0.0
  heading_rate_rps: 0.0
  front_wheel_angle_rad: 0.0
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3707.9940836442074
      y: 73737.19341463102
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: 0.8818043112059876
      w: 0.4716154755078906
  longitudinal_velocity_mps: 0.0
  lateral_velocity_mps: 0.0
  acceleration_mps2: 0.0
  heading_rate_rps: 0.0
  front_wheel_angle_rad: 0.0
  rear_wheel_angle_rad: 0.0
---

Velocity smoother trajectory:

image

$ ros2 topic echo /planning/scenario_planning/motion_velocity_smoother/trajectory --once
header:
  stamp:
    sec: 1703230138
    nanosec: 492757556
  frame_id: map
points:
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3704.4996056985747
      y: 73740.54148407953
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.45061487435178577
      w: 0.8927184522641639
  longitudinal_velocity_mps: -0.25
  lateral_velocity_mps: 0.0
  acceleration_mps2: 0.10000000149011612
  heading_rate_rps: 0.0
  front_wheel_angle_rad: 0.0
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3704.5589949455634
      y: 73740.4610296369
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.44590842839593203
      w: 0.8950785850893037
  longitudinal_velocity_mps: -0.25
  lateral_velocity_mps: 0.0
  acceleration_mps2: 0.10000000149011612
  heading_rate_rps: 0.0
  front_wheel_angle_rad: 0.4950597584247589
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3704.6192280802693
      y: 73740.38120501986
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.43513824397288975
      w: 0.9003636535490478
  longitudinal_velocity_mps: -0.25
  lateral_velocity_mps: 0.0
  acceleration_mps2: 0.10000000149011612
  heading_rate_rps: 0.0
  front_wheel_angle_rad: 0.500360906124115
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3704.6813590219253
      y: 73740.30284848812
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.4276100328304721
      w: 0.9039633066793821
  longitudinal_velocity_mps: -0.25
  lateral_velocity_mps: 0.0
  acceleration_mps2: 0.10000000149011612
  heading_rate_rps: 0.0
  front_wheel_angle_rad: 0.5037233233451843
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3704.7333210674105
      y: 73740.23951685645
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.4198515876363076
      w: 0.9075927745190967
  longitudinal_velocity_mps: -0.2501964271068573
  lateral_velocity_mps: 0.0
  acceleration_mps2: 0.10170228779315948
  heading_rate_rps: 0.0
  front_wheel_angle_rad: 0.5072831511497498
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3704.798066010419
      y: 73740.16330598635
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.40959526554033315
      w: 0.9122673503129135
  longitudinal_velocity_mps: -0.28786900639533997
  lateral_velocity_mps: 0.0
  acceleration_mps2: 0.42337140440940857
  heading_rate_rps: 0.0
  front_wheel_angle_rad: 0.5090170502662659
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3704.8645123539854
      y: 73740.08857390897
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.4006347353584167
      w: 0.9162378560310043
  longitudinal_velocity_mps: -0.4093207120895386
  lateral_velocity_mps: 0.0
  acceleration_mps2: 0.5674140453338623
  heading_rate_rps: 0.0
  front_wheel_angle_rad: 0.4977509081363678
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3704.9324107107027
      y: 73740.01515857223
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.39189004903185903
      w: 0.9200120594154226
  longitudinal_velocity_mps: -0.5301491618156433
  lateral_velocity_mps: 0.0
  acceleration_mps2: 0.5323825478553772
  heading_rate_rps: 0.0
  front_wheel_angle_rad: 0.48375412821769714
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3705.0016951515895
      y: 73739.9430498549
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.3827235773205457
      w: 0.9238629029044105
  longitudinal_velocity_mps: -0.6225395798683167
  lateral_velocity_mps: 0.0
  acceleration_mps2: 0.4432305693626404
  heading_rate_rps: 0.0
  front_wheel_angle_rad: 0.4654862582683563
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3705.072399683693
      y: 73739.87233303244
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.3732274193729558
      w: 0.9277398845733668
  longitudinal_velocity_mps: -0.6900827884674072
  lateral_velocity_mps: 0.0
  acceleration_mps2: 0.33274856209754944
  heading_rate_rps: 0.0
  front_wheel_angle_rad: 0.4368270933628082
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3705.1445399177733
      y: 73739.80308146347
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.36481444670832675
      w: 0.9310802433049997
  longitudinal_velocity_mps: -0.7367295026779175
  lateral_velocity_mps: 0.0
  acceleration_mps2: 0.23392850160598755
  heading_rate_rps: 0.0
  front_wheel_angle_rad: 0.3974311053752899
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3705.217921984651
      y: 73739.73514717446
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.35949335321396386
      w: 0.9331476458712095
  longitudinal_velocity_mps: -0.7678276896476746
  lateral_velocity_mps: 0.0
  acceleration_mps2: 0.14392121136188507
  heading_rate_rps: 0.0
  front_wheel_angle_rad: 0.3598714768886566
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3705.2920748914567
      y: 73739.6680550983
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.35317038156567077
      w: 0.9355590208986061
  longitudinal_velocity_mps: -0.7863491773605347
  lateral_velocity_mps: 0.0
  acceleration_mps2: 0.06067001074552536
  heading_rate_rps: 0.0
  front_wheel_angle_rad: 0.3235335648059845
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3705.367129005091
      y: 73739.601972771
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.3458543865128323
      w: 0.9382881984389617
  longitudinal_velocity_mps: -0.7940273284912109
  lateral_velocity_mps: 0.0
  acceleration_mps2: -0.017180761322379112
  heading_rate_rps: 0.0
  front_wheel_angle_rad: 0.28449708223342896
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3705.443205847906
      y: 73739.53707064345
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.35495440261936095
      w: 0.9348836141793975
  longitudinal_velocity_mps: -0.7918002605438232
  lateral_velocity_mps: 0.0
  acceleration_mps2: -0.09049272537231445
  heading_rate_rps: 0.0
  front_wheel_angle_rad: 0.24400267004966736
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3705.51799468673
      y: 73739.47071364352
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.35590469306946493
      w: 0.9345222573331948
  longitudinal_velocity_mps: -0.7689427137374878
  lateral_velocity_mps: 0.0
  acceleration_mps2: -0.0878804624080658
  heading_rate_rps: 0.0
  front_wheel_angle_rad: 0.22258104383945465
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3705.5926487588663
      y: 73739.40420442814
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.35681161406009476
      w: 0.9341763602617174
  longitudinal_velocity_mps: -0.7460851073265076
  lateral_velocity_mps: 0.0
  acceleration_mps2: -0.08526820689439774
  heading_rate_rps: 0.0
  front_wheel_angle_rad: 0.20115941762924194
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3705.667174164573
      y: 73739.33754988738
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.3576752076795333
      w: 0.9338460503805768
  longitudinal_velocity_mps: -0.7232275009155273
  lateral_velocity_mps: 0.0
  acceleration_mps2: -0.08265594393014908
  heading_rate_rps: 0.0
  front_wheel_angle_rad: 0.17973779141902924
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3705.74157700411
      y: 73739.27075691131
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.358495515621821
      w: 0.9335314484681513
  longitudinal_velocity_mps: -0.7003698945045471
  lateral_velocity_mps: 0.0
  acceleration_mps2: -0.08004368841648102
  heading_rate_rps: 0.0
  front_wheel_angle_rad: 0.15831618010997772
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3705.8158633777343
      y: 73739.20383239003
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.35927257918617644
      w: 0.9332326686549891
  longitudinal_velocity_mps: -0.6775123476982117
  lateral_velocity_mps: 0.0
  acceleration_mps2: -0.07743142545223236
  heading_rate_rps: 0.0
  front_wheel_angle_rad: 0.13689455389976501
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3705.890039385705
      y: 73739.13678321363
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.36000643888577266
      w: 0.9329498185651705
  longitudinal_velocity_mps: -0.6546547412872314
  lateral_velocity_mps: 0.0
  acceleration_mps2: -0.0748191624879837
  heading_rate_rps: 0.0
  front_wheel_angle_rad: 0.11547292023897171
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3705.9641111282817
      y: 73739.06961627217
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.3606971340826417
      w: 0.9326829994508149
  longitudinal_velocity_mps: -0.6317971348762512
  lateral_velocity_mps: 0.0
  acceleration_mps2: -0.07220690697431564
  heading_rate_rps: 0.0
  front_wheel_angle_rad: 0.094051294028759
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3706.0380847057218
      y: 73739.00233845576
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.361344703114017
      w: 0.9324323061388654
  longitudinal_velocity_mps: -0.608939528465271
  lateral_velocity_mps: 0.0
  acceleration_mps2: -0.06959464401006699
  heading_rate_rps: 0.0
  front_wheel_angle_rad: 0.0726296678185463
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3706.111966218284
      y: 73738.93495665446
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.3619491827502529
      w: 0.932197827237558
  longitudinal_velocity_mps: -0.5860819816589355
  lateral_velocity_mps: 0.0
  acceleration_mps2: -0.06698238849639893
  heading_rate_rps: 0.0
  front_wheel_angle_rad: 0.051208045333623886
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3706.185761766228
      y: 73738.86747775835
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.3625106081643656
      w: 0.931979645146986
  longitudinal_velocity_mps: -0.5632243752479553
  lateral_velocity_mps: 0.0
  acceleration_mps2: -0.06437012553215027
  heading_rate_rps: 0.0
  front_wheel_angle_rad: 0.02978641912341118
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3706.2594774498116
      y: 73738.79990865754
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.3630290129457058
      w: 0.9317778360530297
  longitudinal_velocity_mps: -0.5403667688369751
  lateral_velocity_mps: 0.0
  acceleration_mps2: -0.06175786629319191
  heading_rate_rps: 0.0
  front_wheel_angle_rad: 0.008364793844521046
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3706.3331193692934
      y: 73738.73225624209
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.3635044283997618
      w: 0.9315924702002278
  longitudinal_velocity_mps: -0.5175091624259949
  lateral_velocity_mps: 0.0
  acceleration_mps2: -0.05914560705423355
  heading_rate_rps: 0.0
  front_wheel_angle_rad: -0.013056832365691662
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3706.4066936249324
      y: 73738.6645274021
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.36393688409686564
      w: 0.9314236116793823
  longitudinal_velocity_mps: -0.49465158581733704
  lateral_velocity_mps: 0.0
  acceleration_mps2: -0.05653334781527519
  heading_rate_rps: 0.0
  front_wheel_angle_rad: -0.034478459507226944
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3706.4802063169873
      y: 73738.59672902765
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.3643264072401854
      w: 0.9312713186754216
  longitudinal_velocity_mps: -0.4717940092086792
  lateral_velocity_mps: 0.0
  acceleration_mps2: -0.053921084851026535
  heading_rate_rps: 0.0
  front_wheel_angle_rad: -0.05590008199214935
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3706.553663545716
      y: 73738.5288680088
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.36467302258474277
      w: 0.9311356435014759
  longitudinal_velocity_mps: -0.448936402797699
  lateral_velocity_mps: 0.0
  acceleration_mps2: -0.051308825612068176
  heading_rate_rps: 0.0
  front_wheel_angle_rad: -0.07732170820236206
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3706.6270714113775
      y: 73738.46095123565
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.36497675258290946
      w: 0.9310166325442493
  longitudinal_velocity_mps: -0.42607882618904114
  lateral_velocity_mps: 0.0
  acceleration_mps2: -0.04869656637310982
  heading_rate_rps: 0.0
  front_wheel_angle_rad: -0.09874333441257477
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3706.700436014231
      y: 73738.3929855983
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.36523761709134833
      w: 0.9309143263810229
  longitudinal_velocity_mps: -0.4032212197780609
  lateral_velocity_mps: 0.0
  acceleration_mps2: -0.04608430713415146
  heading_rate_rps: 0.0
  front_wheel_angle_rad: -0.12016496062278748
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3706.773763454534
      y: 73738.32497798682
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.36545563337160974
      w: 0.930828759781817
  longitudinal_velocity_mps: -0.3803636431694031
  lateral_velocity_mps: 0.0
  acceleration_mps2: -0.0434720478951931
  heading_rate_rps: 0.0
  front_wheel_angle_rad: -0.14158658683300018
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3706.847059832546
      y: 73738.25693529128
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.3656308158279643
      w: 0.9307599618145257
  longitudinal_velocity_mps: -0.35750606656074524
  lateral_velocity_mps: 0.0
  acceleration_mps2: -0.04085978865623474
  heading_rate_rps: 0.0
  front_wheel_angle_rad: -0.1630082130432129
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3706.9203312485256
      y: 73738.18886440179
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.36576317629045263
      w: 0.930707955735804
  longitudinal_velocity_mps: -0.334648460149765
  lateral_velocity_mps: 0.0
  acceleration_mps2: -0.038247525691986084
  heading_rate_rps: 0.0
  front_wheel_angle_rad: -0.1844298392534256
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3706.9935838027313
      y: 73738.12077220841
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.36585272362097954
      w: 0.9306727591474412
  longitudinal_velocity_mps: -0.3117908835411072
  lateral_velocity_mps: 0.0
  acceleration_mps2: -0.035635266453027725
  heading_rate_rps: 0.0
  front_wheel_angle_rad: -0.2058514654636383
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3707.0668235954213
      y: 73738.05266560122
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.36589946386443256
      w: 0.9306543839383774
  longitudinal_velocity_mps: -0.28893327713012695
  lateral_velocity_mps: 0.0
  acceleration_mps2: -0.033023007214069366
  heading_rate_rps: 0.0
  front_wheel_angle_rad: -0.227273091673851
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3707.1400567268547
      y: 73737.98455147032
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.3659034001882432
      w: 0.9306528363093739
  longitudinal_velocity_mps: -0.2660757005214691
  lateral_velocity_mps: 0.0
  acceleration_mps2: -0.030410747975111008
  heading_rate_rps: 0.0
  front_wheel_angle_rad: -0.24869471788406372
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3707.21328929729
      y: 73737.91643670578
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.3658645328081221
      w: 0.9306681168027057
  longitudinal_velocity_mps: -0.2432180941104889
  lateral_velocity_mps: 0.0
  acceleration_mps2: -0.0277984868735075
  heading_rate_rps: 0.0
  front_wheel_angle_rad: -0.27011632919311523
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3707.286527406986
      y: 73737.84832819771
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.36578285924205767
      w: 0.9307002202023512
  longitudinal_velocity_mps: -0.22036050260066986
  lateral_velocity_mps: 0.0
  acceleration_mps2: -0.02518622763454914
  heading_rate_rps: 0.0
  front_wheel_angle_rad: -0.29153797030448914
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3707.359777156201
      y: 73737.78023283616
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.3656583738196896
      w: 0.9307491357264535
  longitudinal_velocity_mps: -0.19750291109085083
  lateral_velocity_mps: 0.0
  acceleration_mps2: -0.022573968395590782
  heading_rate_rps: 0.0
  front_wheel_angle_rad: -0.31295958161354065
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3707.4330446451936
      y: 73737.71215751123
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.36549106820687277
      w: 0.9308148468202465
  longitudinal_velocity_mps: -0.1746453195810318
  lateral_velocity_mps: 0.0
  acceleration_mps2: -0.019961707293987274
  heading_rate_rps: 0.0
  front_wheel_angle_rad: -0.33438122272491455
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3707.5063359742226
      y: 73737.644109113
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.3652809311870821
      w: 0.9308973312407218
  longitudinal_velocity_mps: -0.15178772807121277
  lateral_velocity_mps: 0.0
  acceleration_mps2: -0.017349448055028915
  heading_rate_rps: 0.0
  front_wheel_angle_rad: -0.35580283403396606
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3707.5796572435465
      y: 73737.57609453156
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.36502794881215994
      w: 0.9309965609957896
  longitudinal_velocity_mps: -0.12893013656139374
  lateral_velocity_mps: 0.0
  acceleration_mps2: -0.014737187884747982
  heading_rate_rps: 0.0
  front_wheel_angle_rad: -0.37722447514533997
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3707.6530145534243
      y: 73737.50812065697
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.3647321043111859
      w: 0.9311125023780608
  longitudinal_velocity_mps: -0.10607254505157471
  lateral_velocity_mps: 0.0
  acceleration_mps2: -0.012124927714467049
  heading_rate_rps: 0.0
  front_wheel_angle_rad: -0.3986460864543915
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3707.7264140041148
      y: 73737.44019437933
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.3643933782156357
      w: 0.9312451159134187
  longitudinal_velocity_mps: -0.08321495354175568
  lateral_velocity_mps: 0.0
  acceleration_mps2: -0.00951266847550869
  heading_rate_rps: 0.0
  front_wheel_angle_rad: -0.4200677275657654
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3707.7998616958753
      y: 73737.37232258875
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.36401174882395837
      w: 0.9313943561768685
  longitudinal_velocity_mps: -0.060357362031936646
  lateral_velocity_mps: 0.0
  acceleration_mps2: -0.0069004083052277565
  heading_rate_rps: 0.0
  front_wheel_angle_rad: -0.4414893388748169
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3707.873363728966
      y: 73737.30451217527
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.36358719153163643
      w: 0.9315601720523141
  longitudinal_velocity_mps: -0.037499770522117615
  lateral_velocity_mps: 0.0
  acceleration_mps2: -0.004288148134946823
  heading_rate_rps: 0.0
  front_wheel_angle_rad: -0.4629109799861908
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3707.9469262036446
      y: 73737.23677002898
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.36358719153163643
      w: 0.9315601720523141
  longitudinal_velocity_mps: -0.014642180874943733
  lateral_velocity_mps: 0.0
  acceleration_mps2: -0.001675888430327177
  heading_rate_rps: 0.0
  front_wheel_angle_rad: -0.4843325912952423
  rear_wheel_angle_rad: 0.0
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3707.9940836442074
      y: 73737.19341463102
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: 0.8818043112059876
      w: 0.4716154755078906
  longitudinal_velocity_mps: -0.0
  lateral_velocity_mps: 0.0
  acceleration_mps2: -2.5195404305122793e-06
  heading_rate_rps: 0.0
  front_wheel_angle_rad: -0.4980549216270447
  rear_wheel_angle_rad: 0.0

Expected behavior

velocity smoother should output an acceptable trajectory?

Actual behavior

the trajectory contains many points, but it looks broken. Autoware does not want to drive

Steps to reproduce

freespace planner +

Versions

No response

Possible causes

It may be related to the "partial trajectory" logic implemented in the freespace planner.

I observe this behavior typically happens in the following situation:

image

where the freespace algorithm wants to drive slightly forward first in order to adjust the vehicle orientation, and then drive backward to the goal point. If the turn point happen to be close to the current location (based on th_arrived_distance_m parameter), then the freespace planner decide to skip the forward part and only send the backward trajectory. I have added a couple printf in the code to verify that. In particular I print for each point of the trajectory whether is_back is set (so here from index 0 to 4 we are supposed to drive forward), and the indices of the partial trajectory generated:

[component_container_mt-31] is_back: 000001111111111111111100000
[component_container_mt-31] indices: 4 21 
[component_container_mt-31] target_index_: 4
[component_container_mt-31] trajectory from 4 to 21

So here the freespace planner decided to skip the small forward section.

I am not sure why this would cause an issue for the velocity smoother:

I am not sure this is the problem though, because I still get the issue when I reduce th_arrived_distance_m.

any idea?

Additional context

No response

VRichardJP commented 8 months ago

One strange behavior I observe is that when the path is broken while the vehicle is asked to go reverse, the trajectory orientation is reversed.

Here the generation is correct:

image

Custom freespace planner trajectory:

header:
  stamp:
    sec: 1703640772
    nanosec: 956512242
  frame_id: map
points:
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3725.650146484375
      y: 73740.2265625
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: 0.20226494505023526
      w: 0.979330838891447
  longitudinal_velocity_mps: -0.25
  lateral_velocity_mps: 0.0
  acceleration_mps2: 0.10000000149011612
  heading_rate_rps: 0.05014345049858093
  front_wheel_angle_rad: 0.0
  rear_wheel_angle_rad: 0.0
[...]

motion_velocity_smoother trajectory:

header:
  stamp:
    sec: 1703640773
    nanosec: 356973420
  frame_id: map
points:
- time_from_start:
    sec: 0
    nanosec: 0
  pose:
    position:
      x: 3725.650146484375
      y: 73740.2265625
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: 0.20226494505023526
      w: 0.979330838891447
  longitudinal_velocity_mps: -0.6013365983963013
  lateral_velocity_mps: 0.0
  acceleration_mps2: -0.7235000133514404
  heading_rate_rps: 0.05264103040099144
  front_wheel_angle_rad: 0.0
  rear_wheel_angle_rad: 0.0

As you can see, orientation field is the same in both case. However when the path is broken I get this:

freespace planner trajectory:

header:
  stamp:
    sec: 1703640202
    nanosec: 83022253
  frame_id: map
points:
- time_from_start:
    sec: 0
    nanosec: 342219741
  pose:
    position:
      x: 3707.8560223578856
      y: 73733.6997291461
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: 0.6741909033788862
      w: 0.7385571242640351
  longitudinal_velocity_mps: -0.1900017261505127
  lateral_velocity_mps: 0.0
  acceleration_mps2: -1.0888986587524414
  heading_rate_rps: 0.012745929881930351
  front_wheel_angle_rad: -0.0
  rear_wheel_angle_rad: 0.0

target_trajectory_angle

motion_velocity_smoother trajectory:

header:
  stamp:
    sec: 1703640201
    nanosec: 683058660
  frame_id: map
points:
- time_from_start:
    sec: 0
    nanosec: 342219741
  pose:
    position:
      x: 3707.8560223578856
      y: 73733.6997291461
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.7288375537869278
      w: 0.6846866583992178
  longitudinal_velocity_mps: -0.0
  lateral_velocity_mps: 0.0
  acceleration_mps2: 0.10000000149011612
  heading_rate_rps: 0.012745929881930351
  front_wheel_angle_rad: 0.0
  rear_wheel_angle_rad: 0.0

The position is exactly the same, but orientation has been reversed:

output_trajectory_angle

stale[bot] commented 4 months ago

This pull request has been automatically marked as stale because it has not had recent activity.