Project

General

Profile

Revision fd29b28e

IDfd29b28eb2f84596cc133172863b245968088898

Added by Priya about 12 years ago

Tested velocity control and added yaw and throttle control to joystick.

View differences:

mikrokopter/src/joystick_control.cpp
46 46

  
47 47
void JoystickControl::joyCallback(const sensor_msgs::Joy::ConstPtr& joy)
48 48
{
49
  // TODO call control.velocity_control(...) based on Joy message
49
    control.velocity_control(joy->axes[1], -joy->axes[0]);
50
    control.set_yaw(-joy->axes[2]);
51
    control.set_thrust((joy->axes[3]+1)/2); ///Adjust thrust to be between [0, 1] instead of [-1, 1]
52
    return;
50 53
}
51 54

  
52 55
int main(int argc, char** argv)

Also available in: Unified diff