def frenet_to_cartesian3D(rs, rx, ry, rtheta, rkappa, rdkappa, s_condition, d_condition):
if fabs(rs - s_condition[0])>= 1.0e-6:
print(“The reference point s and s_condition[0] don’t match”)
cos_theta_r = cos(rtheta)
sin_theta_r = sin(rtheta)
x = rx - sin_theta_r * d_condition[0]
y = ry + cos_theta_r * d_condition[0]
one_minus_kappa_r_d = 1 - rkappa * d_condition[0]
tan_delta_theta = d_condition[1] / one_minus_kappa_r_d
delta_theta = atan2(d_condition[1], one_minus_kappa_r_d)
cos_delta_theta = cos(delta_theta)
theta = NormalizeAngle(delta_theta + rtheta)
kappa_r_d_prime = rdkappa * d_condition[0] + rkappa * d_condition[1]
kappa = ((((d_condition[2] + kappa_r_d_prime * tan_delta_theta) *
cos_delta_theta * cos_delta_theta) /
(one_minus_kappa_r_d) +
rkappa) *
cos_delta_theta / (one_minus_kappa_r_d))
```mermaid
graph LR
A[長方形] – 鏈接 --> B((圓))
A --> C(圓角長方形)
B --> D{菱形}
C --> D
d_dot = d_condition[1] * s_condition[1]
v = sqrt(one_minus_kappa_r_d * one_minus_kappa_r_d * s_condition[1] *
s_condition[1] + d_dot * d_dot)
delta_theta_prime = one_minus_kappa_r_d / cos_delta_theta * (kappa) - rkappa
a = (s_condition[2] * one_minus_kappa_r_d / cos_delta_theta +
s_condition[1] * s_condition[1] / cos_delta_theta *
(d_condition[1] * delta_theta_prime - kappa_r_d_prime))
return x, y, v, a, theta, kappa
```mermaid
classDiagram
Class01 <|-- AveryLongClass : Cool
<<interface>> Class01
Class09 --> C2 : Where am i?
Class09 --* C3
Class09 --|> Class07
Class07 : equals()
Class07 : Object[] elementData
Class01 : size()
Class01 : int chimp
Class01 : int gorilla
class Class10 {
>>service>>
int id
size()
}