GCOP
1.0
|
#include <bulletrccar1.h>
Public Member Functions | |
Bulletrccar1 (BulletWorld &m_world, vector< double > *zs_=0) | |
~Bulletrccar1 () | |
double | Step (Vector4d &xb, double t, const Vector4d &xa, const Vector2d &u, double h, const VectorXd *p, Matrix4d *A=0, Matrix42d *B=0, Matrix4pd *C=0) |
double | Step1 (Vector4d &xb, const Vector2d &u, double h, const VectorXd *p=0, Matrix4d *A=0, Matrix42d *B=0, Matrix4pd *C=0) |
double | Step3 (Vector4d &xb, const Vector2d &u, const Vector4d &w, double h, const VectorXd *p=0, Matrix4d *A=0, Matrix42d *B=0, Matrix4pd *C=0, Matrix4d *D=0) |
bool | reset (const Vector4d &x, double t=0) |
bool | NoiseMatrix (Matrix4d &Q, double t, const Vector4d &x, const Vector2d &u, double dt, const VectorXd *p) |
Public Attributes | |
int | rightIndex |
right of the car index in terms of x,y,z assigns the coordinate sys of car | |
int | upIndex |
int | forwardIndex |
double | carmass |
btVector3 | car_halfdims |
double | gEngineForce |
double | gBreakingForce |
double | maxEngineForce |
double | maxBreakingForce |
double | gVehicleSteering |
double | steeringClamp |
double | torqueClamp |
double | wheelRadius |
double | wheelWidth |
double | wheelFriction |
double | suspensionStiffness |
double | suspensionDamping |
double | suspensionCompression |
double | rollInfluence |
btScalar | suspensionRestLength |
btScalar | m_defaultContactProcessingThreshold |
btVector3 | wheelDirectionCS0 |
btVector3 | wheelAxleCS |
double | initialz |
double | kp_steer |
btTransform | offsettrans |
btTransform | offsettransinv |
vector< double > * | zs |
Height of the rccar only used for visualization only x and y are used in optimization. | |
int | count_zs |
bool | reset_drivevel |
Used to make sure the velocity of the chassis is used just after reset instead of vehicle vel. | |
btRigidBody * | m_carChassis |
btRaycastVehicle * | m_vehicle |
btCollisionShape * | m_wheelShape |
btRaycastVehicle::btVehicleTuning | m_tuning |
btVehicleRaycaster * | m_vehicleRayCaster |
BulletWorld & | m_world |
A simple rear-drive Rccar model with 2nd order dynamics.
The state is and controls are
This uses bullet to propagate the dynamics of the car. To be consistent with bullet #TODO Add steering angle to state since, the control has been changed to cmded steering angle instead of true steering angle demos and OpenGL coordinate system, we use coordinate system of y being up, x being to right, z being to the back of the car. This may be weird but makes it simple for display purposes
Author: Marin Kobilarov marin(at)jhu.edu Modified: Gowtham Garimella
Bulletrccar1::Bulletrccar1 | ( | BulletWorld & | m_world, |
vector< double > * | zs_ = 0 |
||
) |
never deactivate the vehicle from computing collisions etc. Usually the bodies are deactivated after some time if they are not moving
create wheel connections
References gcop::Manifold< T, _n >::bnd, car_halfdims, carmass, forwardIndex, gcop::BulletWorld::IsZupAxis(), gcop::Rccar::l, gcop::Manifold< T, _n >::lb, gcop::BulletWorld::LocalCreateRigidBody(), m_carChassis, gcop::BulletWorld::m_collisionShapes, gcop::BulletWorld::m_dynamicsWorld, m_tuning, m_vehicle, m_vehicleRayCaster, m_wheelShape, m_world, offsettrans, offsettransinv, rightIndex, rollInfluence, steeringClamp, suspensionCompression, suspensionDamping, suspensionRestLength, suspensionStiffness, torqueClamp, gcop::System< T, _nx, _nu, _np >::U, gcop::Manifold< T, _n >::ub, upIndex, wheelAxleCS, wheelDirectionCS0, wheelFriction, wheelRadius, and wheelWidth.
gcop::Bulletrccar1::~Bulletrccar1 | ( | ) | [inline] |
bool Bulletrccar1::NoiseMatrix | ( | Matrix4d & | Q, |
double | t, | ||
const Vector4d & | x, | ||
const Vector2d & | u, | ||
double | dt, | ||
const VectorXd * | p | ||
) |
bool Bulletrccar1::reset | ( | const Vector4d & | x, |
double | t = 0 |
||
) |
References count_zs, gBreakingForce, gEngineForce, gVehicleSteering, initialz, gcop::BulletWorld::IsZupAxis(), m_carChassis, gcop::BulletWorld::m_dynamicsWorld, m_vehicle, m_world, gcop::BulletWorld::Reset(), reset_drivevel, gcop::System< T, _nx, _nu, _np >::t, gcop::System< T, _nx, _nu, _np >::x, and zs.
Referenced by Step().
double Bulletrccar1::Step | ( | Vector4d & | xb, |
double | t, | ||
const Vector4d & | xa, | ||
const Vector2d & | u, | ||
double | h, | ||
const VectorXd * | p, | ||
Matrix4d * | A = 0 , |
||
Matrix42d * | B = 0 , |
||
Matrix4pd * | C = 0 |
||
) | [virtual] |
Reimplemented from gcop::Rccar.
double Bulletrccar1::Step1 | ( | Vector4d & | xb, |
const Vector2d & | u, | ||
double | h, | ||
const VectorXd * | p = 0 , |
||
Matrix4d * | A = 0 , |
||
Matrix42d * | B = 0 , |
||
Matrix4pd * | C = 0 |
||
) |
double Bulletrccar1::Step3 | ( | Vector4d & | xb, |
const Vector2d & | u, | ||
const Vector4d & | w, | ||
double | h, | ||
const VectorXd * | p = 0 , |
||
Matrix4d * | A = 0 , |
||
Matrix42d * | B = 0 , |
||
Matrix4pd * | C = 0 , |
||
Matrix4d * | D = 0 |
||
) |
References m_carChassis, and Step1().
btVector3 gcop::Bulletrccar1::car_halfdims |
Referenced by Bulletrccar1().
double gcop::Bulletrccar1::carmass |
Referenced by Bulletrccar1().
Referenced by Bulletrccar1().
Referenced by reset().
double gcop::Bulletrccar1::initialz |
Referenced by reset().
double gcop::Bulletrccar1::kp_steer |
btRigidBody* gcop::Bulletrccar1::m_carChassis |
Referenced by Bulletrccar1(), reset(), Step1(), and Step3().
btRaycastVehicle::btVehicleTuning gcop::Bulletrccar1::m_tuning |
Referenced by Bulletrccar1().
btRaycastVehicle* gcop::Bulletrccar1::m_vehicle |
Referenced by Bulletrccar1(), reset(), and Step1().
btVehicleRaycaster* gcop::Bulletrccar1::m_vehicleRayCaster |
Referenced by Bulletrccar1().
btCollisionShape* gcop::Bulletrccar1::m_wheelShape |
Referenced by Bulletrccar1().
Referenced by Bulletrccar1(), reset(), and Step1().
btTransform gcop::Bulletrccar1::offsettrans |
Referenced by Bulletrccar1(), and Step1().
btTransform gcop::Bulletrccar1::offsettransinv |
Referenced by Bulletrccar1(), and Step1().
Used to make sure the velocity of the chassis is used just after reset instead of vehicle vel.
Referenced by reset().
right of the car index in terms of x,y,z assigns the coordinate sys of car
Referenced by Bulletrccar1().
Referenced by Bulletrccar1().
Referenced by Bulletrccar1(), and Step1().
Referenced by Bulletrccar1().
Referenced by Bulletrccar1().
Referenced by Bulletrccar1().
Referenced by Bulletrccar1().
Referenced by Bulletrccar1().
Referenced by Bulletrccar1().
btVector3 gcop::Bulletrccar1::wheelAxleCS |
Referenced by Bulletrccar1().
btVector3 gcop::Bulletrccar1::wheelDirectionCS0 |
Referenced by Bulletrccar1().
Referenced by Bulletrccar1().
Referenced by Bulletrccar1().
Referenced by Bulletrccar1().
vector<double>* gcop::Bulletrccar1::zs |