YouBotConfiguration.cpp
Go to the documentation of this file.
00001 /******************************************************************************
00002  * Copyright (c) 2011
00003  * Locomotec
00004  *
00005  * Author:
00006  * Sebastian Blumenthal
00007  *
00008  *
00009  * This software is published under a dual-license: GNU Lesser General Public
00010  * License LGPL 2.1 and BSD license. The dual-license implies that users of this
00011  * code may choose which terms they prefer.
00012  *
00013  * Redistribution and use in source and binary forms, with or without
00014  * modification, are permitted provided that the following conditions are met:
00015  *
00016  * * Redistributions of source code must retain the above copyright
00017  * notice, this list of conditions and the following disclaimer.
00018  * * Redistributions in binary form must reproduce the above copyright
00019  * notice, this list of conditions and the following disclaimer in the
00020  * documentation and/or other materials provided with the distribution.
00021  * * Neither the name of Locomotec nor the names of its
00022  * contributors may be used to endorse or promote products derived from
00023  * this software without specific prior written permission.
00024  *
00025  * This program is free software: you can redistribute it and/or modify
00026  * it under the terms of the GNU Lesser General Public License LGPL as
00027  * published by the Free Software Foundation, either version 2.1 of the
00028  * License, or (at your option) any later version or the BSD license.
00029  *
00030  * This program is distributed in the hope that it will be useful,
00031  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00032  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00033  * GNU Lesser General Public License LGPL and the BSD license for more details.
00034  *
00035  * You should have received a copy of the GNU Lesser General Public
00036  * License LGPL and BSD license along with this program.
00037  *
00038  ******************************************************************************/
00039 
00040 #include "youbot_driver_ros_interface/YouBotConfiguration.h"
00041 
00042 namespace youBot
00043 {
00044 
00045 YouBotBaseConfiguration::YouBotBaseConfiguration()
00046 {
00047     youBotBase = 0;
00048 
00049     /* provide some default values for the joint names (might be overwritten) */
00050     /*
00051      *  numbering of youBot wheels:
00052      *
00053      *    FRONT
00054      *
00055      * 1 ---+--- 2
00056      *      |
00057      *      |
00058      *      |
00059      *      |
00060      * 3 ---+--- 4
00061      *
00062      *    BACK
00063      */
00064     wheelNames.clear();
00065     wheelNames.push_back("wheel_joint_fl"); //wheel #1
00066     wheelNames.push_back("wheel_joint_fr"); //wheel #2
00067     wheelNames.push_back("wheel_joint_bl"); //wheel #3
00068     wheelNames.push_back("wheel_joint_br"); //wheel #4
00069 }
00070 
00071 YouBotBaseConfiguration::~YouBotBaseConfiguration()
00072 {
00073     // No delete of youBot base pointer - this class has no ownership 
00074 }
00075 
00076 YouBotArmConfiguration::YouBotArmConfiguration()
00077 {
00078     youBotArm = 0;
00079     armJointTrajectoryAction = 0;
00080 
00081     /* provide some default values for the joint names (might be overwritten) */
00082     jointNames.clear();
00083     jointNames.push_back("arm_joint_1");
00084     jointNames.push_back("arm_joint_2");
00085     jointNames.push_back("arm_joint_3");
00086     jointNames.push_back("arm_joint_4");
00087     jointNames.push_back("arm_joint_5");
00088 
00089     gripperFingerNames.clear();
00090     gripperFingerNames.push_back("gripper_finger_joint_l");
00091     gripperFingerNames.push_back("gripper_finger_joint_r");
00092 }
00093 
00094 YouBotArmConfiguration::~YouBotArmConfiguration()
00095 {
00096     // No delete of youBot arm pointer - this class has no ownership 
00097     if (armJointTrajectoryAction) {
00098                 delete armJointTrajectoryAction;
00099                 armJointTrajectoryAction = 0;
00100         }
00101     jointNames.clear();
00102 }
00103 
00104 YouBotConfiguration::YouBotConfiguration()
00105 {
00106     youBotArmConfigurations.clear();
00107     armNameToArmIndexMapping.clear();
00108     hasBase = false;
00109     hasArms = false;
00110 }
00111 
00112 YouBotConfiguration::~YouBotConfiguration()
00113 {
00114     youBotArmConfigurations.clear();
00115     armNameToArmIndexMapping.clear();
00116 }
00117 
00118 } // namespace youBot
00119 
00120 /* EOF */


youbot_driver_ros_interface
Author(s): Sebastian Blumenthal
autogenerated on Thu Jun 6 2019 20:43:35