Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
servo_manager.h
00001 #pragma once 00002 00003 #include "catchrobo_sim/motor_manager.h" 00004 #include "motor_driver_bridge/motor_driver_struct.h" 00005 00006 class ServoManager : public MotorManager 00007 { 00008 // float ONE_ACTION_S_; 00009 00010 public: 00011 // using MotorManager::MotorManager; //C++11の機能 00012 00013 ServoManager(){}; 00014 00015 // dt間隔で呼ばれる 00016 virtual void getCmd(ControlStruct &command, ControlResult::ControlResult &finished) 00017 { 00018 MotorManager::getCmd(command, finished); 00019 00020 // catchrobo_msgs::MyRosCmd ros_cmd; 00021 // getRosCmd(ros_cmd); 00022 // command.p_des = ros_cmd.position; 00023 StateStruct current_state; 00024 current_state.position = command.p_des; 00025 current_state.velocity = command.v_des; 00026 current_state.torque = command.torque_feed_forward; 00027 MotorManager::setCurrentState(current_state); 00028 // finished = ControlResult::RUNNING; 00029 // if (t_ > ONE_ACTION_S_) 00030 // { 00031 // finished = ControlResult::FINISH; 00032 // } 00033 }; 00034 };
Generated on Mon Sep 26 2022 13:47:03 by
