The class can make a transformation: the 3D position of enemy --> pitch,yaw angle of gimbal. For more derails, see projectile_model.pdf TODO: add enemy motion estimation.
More...
#include <gimbal_control.h>
|
void | Init (float x, float y, float z, float pitch, float yaw, float init_v, float init_k) |
| Init the Transformation matrix from camera to gimbal //TODO: write in ros tf. More...
|
|
void | Transform (geometry_msgs::Point32 &postion, float &pitch, float &yaw) |
| Get the gimbal control info. More...
|
|
|
float | BulletModel (float x, float v, float angle) |
| Calculate the actual y value with air resistance. More...
|
|
float | GetPitch (float x, float y, float v) |
| Get the gimbal control angle. More...
|
|
The class can make a transformation: the 3D position of enemy --> pitch,yaw angle of gimbal. For more derails, see projectile_model.pdf TODO: add enemy motion estimation.
◆ BulletModel()
float roborts_decision::GimbalContrl::BulletModel |
( |
float |
x, |
|
|
float |
v, |
|
|
float |
angle |
|
) |
| |
|
private |
Calculate the actual y value with air resistance.
- Parameters
-
x | the distanc |
v | Projectile velocity |
angle | Pitch angle |
- Returns
- The actual y value in the gimbal coordinate
◆ GetPitch()
float roborts_decision::GimbalContrl::GetPitch |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
v |
|
) |
| |
|
private |
Get the gimbal control angle.
- Parameters
-
x | Distance from enemy(the armor selected to shoot) to gimbal |
y | Value of y in gimbal coordinate. |
v | Projectile velocity |
- Returns
- Gimbal pitch angle
◆ Init()
void roborts_decision::GimbalContrl::Init |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
z, |
|
|
float |
pitch, |
|
|
float |
yaw, |
|
|
float |
init_v, |
|
|
float |
init_k |
|
) |
| |
Init the Transformation matrix from camera to gimbal //TODO: write in ros tf.
- Parameters
-
x | Translate x |
y | Translate y |
z | Translate z |
pitch | Rotate pitch |
yaw | Rotate yaw |
◆ Transform()
void roborts_decision::GimbalContrl::Transform |
( |
geometry_msgs::Point32 & |
postion, |
|
|
float & |
pitch, |
|
|
float & |
yaw |
|
) |
| |
Get the gimbal control info.
- Parameters
-
postion | Enemy position(actually it should be the target armor). |
pitch | Input and output actual pitch angle |
yaw | Input and output actual yaw angle |
◆ init_k_
float roborts_decision::GimbalContrl::init_k_ |
|
private |
◆ init_v_
float roborts_decision::GimbalContrl::init_v_ |
|
private |
◆ offset_
geometry_msgs::Point32 roborts_decision::GimbalContrl::offset_ |
|
private |
Transformation matrix between camera coordinate system and gimbal coordinate system. Translation unit: cm
◆ offset_pitch_
float roborts_decision::GimbalContrl::offset_pitch_ |
|
private |
Rotation matrix unit: degree.
◆ offset_yaw_
float roborts_decision::GimbalContrl::offset_yaw_ |
|
private |
The documentation for this class was generated from the following files: