实现了yaw轴的转动,mid360参数更加接近实际的参数
This commit is contained in:
1 parent
72f407c110
commit
96445bd5f1
61 files changed
+2460
-235
No files matched your search
@@ -59,7 +59,7 @@ def cylinder_clearance(row,x,y,radius):
|
||||
q=row[4:];yaw=math.atan2(2*(q[3]*q[2]+q[0]*q[1]),1-2*(q[1]*q[1]+q[2]*q[2]))
|
||||
dx,dy=x-row[1],y-row[2]
|
||||
bx=math.cos(yaw)*dx+math.sin(yaw)*dy;by=-math.sin(yaw)*dx+math.cos(yaw)*dy
|
||||
# Union of the actual SDF chassis and gimbal collision boxes.
|
||||
# Chassis box and the yaw sweep of the SDF gimbal collision box.
|
||||
chassis=math.hypot(max(0,abs(bx)-0.289),max(0,abs(by)-0.2605))
|
||||
gimbal=math.hypot(max(0,abs(bx-0.12)-0.20),max(0,abs(by)-0.15))
|
||||
gimbal=math.hypot(bx,by)-math.hypot(0.2656,0.1439)
|
||||
return min(chassis,gimbal)-radius
|
||||
@@ -111,6 +111,8 @@ def main():
|
||||
help='use an explicitly reserved ROS_DOMAIN_ID for parallel tests')
|
||||
parser.add_argument('--timeout', type=float, default=420.0,
|
||||
help='whole-stack validation deadline, including up to three startup attempts')
|
||||
parser.add_argument('--continue-on-failure', action='store_true',
|
||||
help='try later full-field goals after recording a failed leg and waiting for recovery')
|
||||
parser.add_argument('--scenario', choices=['clear', 'cylinder', 'blocked', 'lidar_loss'], default='clear')
|
||||
parser.add_argument('--obstacle-x',type=float,default=-4.0)
|
||||
parser.add_argument('--obstacle-y',type=float,default=-1.5)
|
||||
@@ -121,6 +123,8 @@ def main():
|
||||
parser.error('--round-trip-regression requires clear or cylinder')
|
||||
if args.full_field and args.scenario != 'clear':
|
||||
parser.error('--full-field starts the clear-field coverage route')
|
||||
if args.continue_on_failure and not args.full_field:
|
||||
parser.error('--continue-on-failure requires --full-field')
|
||||
multileg = args.round_trip_regression or args.full_field or args.southeast_round_trip
|
||||
if args.full_field:
|
||||
route = ARENA_GOALS
|
||||
@@ -174,6 +178,7 @@ def main():
|
||||
record_duration = 3600.0 if args.full_field else 1200.0 if multileg else 600.0
|
||||
record_log = open(args.output/'record.log', 'w', encoding='utf8')
|
||||
recorder = subprocess.Popen([str(recorder_exe), '--ros-args',
|
||||
'--params-file', str(params_file.with_name('field_cloud.yaml')),
|
||||
'-p', 'use_sim_time:=true', '-p', f'output_directory:={args.output.resolve()}/dataset',
|
||||
'-p', f'duration_sec:={record_duration}', '-p', f'point_cloud_topic:={args.lio_cloud_topic}'],
|
||||
stdout=record_log, stderr=subprocess.STDOUT, start_new_session=True)
|
||||
@@ -404,6 +409,7 @@ def main():
|
||||
'start_sim': goal_start_sim, 'end_sim': goal_end_sim, 'timed_out': timed_out,
|
||||
'trajectory_metrics': metrics(estimate_goal, truth_goal),
|
||||
'truth_goal_error_m': math.hypot(truth_goal[-1][1]-target[0], truth_goal[-1][2]-target[1]) if truth_goal else None,
|
||||
'truth_end_xy_m': truth_goal[-1][1:3] if truth_goal else None,
|
||||
'minimum_cylinder_clearance_m': min(cylinder_clearance(row, args.obstacle_x, args.obstacle_y, args.obstacle_radius) for row in truth_goal)
|
||||
if truth_goal and args.scenario == 'cylinder' else None,
|
||||
'health_failures_during_goal': sum(not value for stamp, value in health_events
|
||||
@@ -461,7 +467,8 @@ def main():
|
||||
f'goal={leg["goal_succeeded"]} max_error={quality["maximum_position_error_m"]}', flush=True)
|
||||
if multileg and not leg['goal_succeeded']:
|
||||
spin_for(8)
|
||||
break
|
||||
if not args.continue_on_failure:
|
||||
break
|
||||
result.update(counts)
|
||||
result['map_to_odom_publishers'] = len(publishers)
|
||||
result['amcl_present'] = 'amcl' in node.get_node_names()
|
||||
|
||||
Reference in new issue
Block a user