webots控制器编写

来源:互联网 发布:苹果mac在哪里升级 编辑:程序博客网 时间:2024/05/16 06:03

空的模板:
hexapod例程源码:
servo作为电机使用的旋转写法:
  const char *SERVO_NAME = "servo";  WbDeviceTag servo;  servo = wb_robot_get_device(SERVO_NAME);  if (!servo) {    printf("could not find servo: %s\n",servo);  }  wb_servo_set_position(servo, INFINITY);  wb_servo_set_velocity(servo, 6.28); // 1 rotation per second

csdn上传图片很不方便,仿真效果见我的轻博客 http://mytool.lofter.com/。



0 0