📄 bandit.hh
字号:
/* * Gazebo - Outdoor Multi-Robot Simulator * Copyright (C) 2003 * Nate Koenig & Andrew Howard * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *//* * Desc: Model of a simple humanoid torso * Author: Nate Koenig * Date: 31 Aug 2005 * CVS: $Id: Bandit.hh,v 1.1 2005/08/31 23:06:00 natepak Exp $ */#ifndef BANDIT_HH#define BANDIT_HH#include "gazebo.h"#include "Model.hh"class Body;class HingeJoint;enum Joints {L_SHOULDER, L_UPPERARM, L_ELBOW, L_LOWERARM, L_WRIST, R_SHOULDER, R_UPPERARM, R_ELBOW, R_LOWERARM, R_WRIST, HEAD, JOINT_COUNT};class Bandit : public Model{ // Constructor public: Bandit( World *world ); // Destructor public: virtual ~Bandit(); // Load stuff public: int Load( WorldFile *file, WorldFileNode *node ); // Initialize stuff public: int Init( WorldFile *file, WorldFileNode *node ); // Finalize stuff public: int Fini(); // Get commands from the external interface private: void IfaceGetCmd(); // Update the data in the external interface private: void IfacePutData(); // Do updates public: void Update( double step ); // Set the velocity of a joint private: void SetJointVelocity( Joint *joint, int param, double angle, double cmd_angle); // The canonical body private: Body *torso; private: Body *head; private: Body *leftShoulder; private: Body *leftUpperArm; private: Body *leftElbow; private: Body *leftLowerArm; private: Body *leftHand; private: Body *rightShoulder; private: Body *rightUpperArm; private: Body *rightElbow; private: Body *rightLowerArm; private: Body *rightHand; private: Joint *joints[JOINT_COUNT]; private: gz_joint_t *joint_iface;};#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -