diff --git a/CMakeLists.txt b/CMakeLists.txt index d80af90..bae5d72 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,65 +1,65 @@ project(liboncilla-webots C CXX) cmake_minimum_required(VERSION 2.8) find_package(BiorobCMakeUtils 0.3.4 REQUIRED) include_all_biorob_cmake_utils() -make_std_versionning(MAJOR 0 MINOR 2 PATCH 0~rc1) +make_std_versionning(MAJOR 0 MINOR 2 PATCH 0~rc2) find_package(PkgConfig REQUIRED) ################################################################################ # Boost, C++11 and CLANG check ################################################################################ find_package(Boost REQUIRED) if("${CMAKE_CXX_COMPILER}" MATCHES ".*clang.*") if( "${Boost_VERSION}" VERSION_LESS "104801") message(FATAL_ERROR "There is some incompatibility with boost <= 1.48.0 (here ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}) and C++11 features. Since your compiler (Clang) fully support C++11, you should use a more recent version of Boost to compile this library. C++11 is needed by NemoMath dependency.") endif( "${Boost_VERSION}" VERSION_LESS "104801") endif("${CMAKE_CXX_COMPILER}" MATCHES ".*clang.*") pkg_check_modules(LIBWEBOTS REQUIRED libwebots-communication-0.3>=0.3.1~rc3 libwebots-messages-0.3>=0.3.1~rc3 ) pkg_check_modules(LIBONCILLA REQUIRED liboncilla-0) find_package(Webots 6.4.1 REQUIRED) add_definitions(${LIBONCILLA_CFLAGS_OTHER}) include_directories(${LIBWEBOTS_INCLUDE_DIRS} ${LIBONCILLA_INCLUDE_DIRS} ${WEBOTS_INCLUDE_DIRS}) set(LIBONCILLA_WEBOTS_INCLUDE_DIRS include/liboncilla-webots-${VERSION_API} ) set(PKG_CONFIG_FILE ${PROJECT_BINARY_DIR}/liboncilla-webots-${VERSION_API}.pc) configure_file(liboncilla-webots.pc.in ${PKG_CONFIG_FILE} @ONLY) install(FILES ${PKG_CONFIG_FILE} DESTINATION lib/pkgconfig) include(CheckCXXCompilerFlag) add_subdirectory(src) ################################################################################ # webots world file generation ################################################################################ set(WORLD_FILES_DIR ${PROJECT_SOURCE_DIR}/webots-data/worlds) set(WORLD_FILES_BUILD_DIR ${PROJECT_BINARY_DIR}/webots-data/worlds) execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} --variable example_list liboncilla-0 OUTPUT_VARIABLE LIBONCILLA_EXAMPLE_LIST OUTPUT_STRIP_TRAILING_WHITESPACE) foreach(e ${LIBONCILLA_EXAMPLE_LIST}) set(CONTROLLER ${e}) configure_file(${WORLD_FILES_DIR}/Oncilla.wbt.in ${WORLD_FILES_BUILD_DIR}/Oncilla-${e}.wbt @ONLY) endforeach(e ${LIBONCILLA_EXAMPLE_LIST}) diff --git a/src/liboncilla-webots/LegParameters.h b/src/liboncilla-webots/LegParameters.h index 96b6803..37763d8 100644 --- a/src/liboncilla-webots/LegParameters.h +++ b/src/liboncilla-webots/LegParameters.h @@ -1,31 +1,31 @@ /** * \file LegParameters.h * * \date Jun 22, 2012 * \author Alexandre Tuleu */ #ifndef LIBONCILLA_WEBOTS_LEGPARAMETERS_H_ #define LIBONCILLA_WEBOTS_LEGPARAMETERS_H_ #include <Eigen/Core> class LegParameters{ public : enum Config { UNDEFINED = 0, - DEFINED = 1 >> 0, - OPEN_PANTOGRAPH = 1 >> 1, - SPRING_FOOT = 1 >> 2 + DEFINED = 1 << 0, + OPEN_PANTOGRAPH = 1 << 1, + SPRING_FOOT = 1 << 2 }; double l1,l2,l3,deltaL; Eigen::Vector3d l2L3AxisInL3,posOfD2inL3; uint32_t jD1D2; Config config; LegParameters(); ~LegParameters(); }; #endif // LIBONCILLA_WEBOTS_LEGPARAMETERS_H_ diff --git a/src/liboncilla-webots/WebotsOncillaBackend.cpp b/src/liboncilla-webots/WebotsOncillaBackend.cpp index 89da115..830b073 100644 --- a/src/liboncilla-webots/WebotsOncillaBackend.cpp +++ b/src/liboncilla-webots/WebotsOncillaBackend.cpp @@ -1,305 +1,304 @@ /* * WebotsOncillaBackend.cpp * * Created on: Jan 22, 2013 * Author: tuleu */ #include "WebotsOncillaBackend.h" #include "Synchronizer.h" #include <liboncilla/Oncilla.h> #include <liboncilla/nodes/Nodes.h> #include <liboncilla/nodes/SupervisorNodes.h> #include <liboncilla-webots/nodes/Nodes.h> #include <libwebots/communication/client.hh> #include <libwebots/plugin/modules/jointmanager/jointmanagerbuilder.hh> #include <webots/Supervisor.hpp> #include <webots/Node.hpp> #include "WebotsNodeWrapper.h" #include <biorob-cpp/log/Logger.h> using namespace boost; namespace ro = rci::oncilla; namespace low = liboncilla::webots; BIOROB_CPP_EXPORT_PLUGIN(OncillaBackend,WebotsOncillaBackend) const char * WebotsOncillaBackend::LEG_PREFIXES[4] = {"LEFT_FORE", "RIGHT_FORE", "LEFT_HIND", "RIGHT_HIND"}; //we don't accept any throw in this constructor !!!! WebotsOncillaBackend::WebotsOncillaBackend() : d_supervisor(new webots::Supervisor()) , d_synchronizer() , d_legParameters(){ //this constructor should not fail, never otherwise the exception is not //propagated to webots. Initialization is Lazily performed in InitIfNeeded() } WebotsOncillaBackend::~WebotsOncillaBackend(){ } shared_ptr<ro::Synchronizer> WebotsOncillaBackend::CreateSynchronizer(){ InitIfNeeded(); return boost::static_pointer_cast<ro::Synchronizer,low::Synchronizer>(d_synchronizer); } boost::shared_ptr<rci::oncilla::L0> WebotsOncillaBackend::CreateL0(rci::oncilla::Leg leg , const std::string& name){ InitIfNeeded(); return ro::L0::Ptr(new low::L0(name, d_supervisor->getServo(LEG_PREFIXES[leg] + std::string("_L_0")))); } boost::shared_ptr<rci::oncilla::L1> WebotsOncillaBackend::CreateL1(rci::oncilla::Leg leg , const std::string& name){ InitIfNeeded(); std::string servoName (LEG_PREFIXES[leg]); servoName += "_L_1"; return ro::L1::Ptr(new low::L1(*d_synchronizer, name, d_supervisor->getServo(servoName), WebotsNodeWrapper(*d_supervisor, servoName))); } boost::shared_ptr<rci::oncilla::L2> WebotsOncillaBackend::CreateL2(rci::oncilla::Leg leg , const std::string& name){ InitIfNeeded(); std::string servoPrefix (LEG_PREFIXES[leg]); return ro::L2::Ptr(new low::L2(*d_synchronizer, name, GetJointIdentifier(leg,D1_D2), d_supervisor->getServo(servoPrefix + "_L_2"), d_supervisor->getServo(servoPrefix + "_D_2"), LegConfigSection(leg))); } boost::shared_ptr<rci::oncilla::L3> WebotsOncillaBackend::CreateL3(rci::oncilla::Leg leg , const std::string& name){ InitIfNeeded(); std::string prefix(LEG_PREFIXES[leg]); return ro::L3::Ptr(new low::L3(name, d_supervisor->getServo(prefix + "_L_3"))); } boost::shared_ptr<rci::oncilla::Trunk> WebotsOncillaBackend::CreateTrunk(){ InitIfNeeded(); return ro::Trunk::Ptr(new low::Trunk(d_supervisor->getFromDef("ONCILLA"))); } boost::shared_ptr<rci::oncilla::SupervisorTrunk> WebotsOncillaBackend::CreateSupervisorTrunk(){ InitIfNeeded(); return ro::SupervisorTrunk::Ptr(new low::SupervisorTrunk(d_supervisor->getFromDef("ONCILLA"))); } boost::shared_ptr<rci::oncilla::SupervisorL4> WebotsOncillaBackend::CreateSupervisorL4(rci::oncilla::Leg leg , const std::string& name){ InitIfNeeded(); std::string prefix(LEG_PREFIXES[leg]); return ro::SupervisorL4::Ptr(new low::SupervisorL4(name, *d_supervisor, d_config.Contact(), prefix + "_FOOT")); } void WebotsOncillaBackend::InitIfNeeded(){ if(!d_synchronizer){ Init(); } } void WebotsOncillaBackend::Init(){ d_config.LoadConfigFile(); d_synchronizer = SynchronizerPtr(new low::Synchronizer(d_supervisor, d_config.Main())); d_legParameters.assign(rci::oncilla::NUM_LEGS,LegParameters()); for(ListOfLegParameters::iterator lp = d_legParameters.begin(); lp != d_legParameters.end(); ++lp){ rci::oncilla::Leg l = (rci::oncilla::Leg)(lp - d_legParameters.begin()); ExtractLegParametersAndInitModel(l,*lp); } } void WebotsOncillaBackend::ExtractLegParametersAndInitModel(rci::oncilla::Leg l, LegParameters & params){ if(l < 0 || l >= rci::oncilla::NUM_LEGS){ std::ostringstream os; os << "Leg id " << l << " is out of range ([0 , " << rci::oncilla::NUM_LEGS << "]."; throw std::runtime_error(os.str()); } namespace c = liboncilla::webots::config; std::string l1Name(LEG_PREFIXES[l]), l2Name(LEG_PREFIXES[l]), l3Name(LEG_PREFIXES[l]), footName(LEG_PREFIXES[l]), p1Name(LEG_PREFIXES[l]), d2Name(LEG_PREFIXES[l]), p2Name(LEG_PREFIXES[l]), d1Name(LEG_PREFIXES[l]); l1Name.append("_L_1"); l2Name.append("_L_2"); l3Name.append("_L_3"); p1Name.append("_P_1"); p2Name.append("_P_2"); footName.append("_FOOT"); d1Name.append("_D_1"); d2Name.append("_D_2"); const c::LegSection & lConf = LegConfigSection(l); ExtractLegParameters(WebotsNodeWrapper(*d_supervisor,l1Name), WebotsNodeWrapper(*d_supervisor,l2Name), WebotsNodeWrapper(*d_supervisor,l3Name), WebotsNodeWrapper(*d_supervisor,p1Name), WebotsNodeWrapper(*d_supervisor,footName), - d2Name, + p2Name, params); log(debug, rci::oncilla::Oncilla::nameOfLeg(l), " leg has dimensions l1=", params.l1, " l2=" , params.l2, " l3=" , params.l3, " deltaL=", params.deltaL); - params.config = LegParameters::DEFINED; + //Now we init the model params.jD1D2 = GetJointIdentifier(l,D1_D2); using namespace libwebots::communication; using namespace libwebots::plugin::modules::messages; using namespace libwebots::plugin::modules::messages; double drawSize = 0.04; Client & client = Client::Instance(); //create the missing joints client.Send(builders::JointManager::CreateHingeJoint(GetJointIdentifier(l,L2_L3), l2Name, l3Name, jointmanager::JointDefinition::CHILD, params.posOfD2inL3, params.l2L3AxisInL3, drawSize)); client.Send(builders::JointManager::CreateHingeJoint(GetJointIdentifier(l,D2_L3), d2Name, l3Name, jointmanager::JointDefinition::CHILD, params.posOfD2inL3, params.l2L3AxisInL3, drawSize)); client.Send(builders::JointManager::AddManagedjoint(GetJointIdentifier(l,D1_D2), d1Name,d2Name)); lConf.Diagonal().SendJointDefinition(GetJointIdentifier(l,D1_D2)); ///\todo refactor this if(params.config & LegParameters::OPEN_PANTOGRAPH){ client.Send(builders::JointManager::AddManagedjoint(GetJointIdentifier(l,P1_P2), p1Name,p2Name)); lConf.Parallel().SendJointDefinition(GetJointIdentifier(l,P1_P2)); } if(params.config & LegParameters::SPRING_FOOT){ client.Send(builders::JointManager::AddManagedjoint(GetJointIdentifier(l,L3_FOOT), l3Name,footName)); lConf.Foot().SendJointDefinition(GetJointIdentifier(l,L3_FOOT)); } } template <typename T> bool abs_compare( T a, T b){ return std::abs<T>(a) < std::abs(b); } inline double GetAbsMaxOfArray(const double * val, unsigned int size){ return std::abs(*std::max_element(val,val+size,abs_compare<double>)); } void WebotsOncillaBackend::ExtractLegParameters(const WebotsNodeWrapper & l1, const WebotsNodeWrapper & l2, const WebotsNodeWrapper & l3, const WebotsNodeWrapper & p1, const WebotsNodeWrapper & foot, - const std::string & d2name, + const std::string & p2name, LegParameters & params){ params.l1 = GetAbsMaxOfArray(l2.GetField<const double *>("translation"),3); params.l2 = GetAbsMaxOfArray(l3.GetField<const double *>("translation"),3); const double * fPos = foot.GetField<const double *>("translation"); params.l3 = GetAbsMaxOfArray(fPos,3); params.l2L3AxisInL3 = Eigen::Vector3d(l3.GetField<webots::Field*>("rotation")->getSFRotation()); params.deltaL = std::abs(GetAbsMaxOfArray(p1.GetField<const double *>("translation"),3)-params.l1); //now look for the maximal index of the position of the foot unsigned int index(0); for(unsigned int i = 1; i < 3; ++i){ if(std::abs(fPos[i]) > std::abs(fPos[index])){ index = i; } } bool posDirection= fPos[index] < 0.0; params.posOfD2inL3.setZero(3,1); double offset = params.l3 / 2.0 - params.deltaL; params.posOfD2inL3.coeffRef(index) = (posDirection ? 1.0 : -1.0) * offset; params.config = LegParameters::DEFINED; if(foot.Type() == webots::Node::SERVO){ params.config = static_cast<LegParameters::Config>(params.config | LegParameters::SPRING_FOOT); } - if(!d_supervisor->getFromDef(d2name)){ + if(d_supervisor->getFromDef(p2name)){ params.config = static_cast<LegParameters::Config>(params.config | LegParameters::OPEN_PANTOGRAPH); } - } uint32_t WebotsOncillaBackend::GetJointIdentifier(rci::oncilla::Leg l , JointIdentifier j){ return (j << 8) + l; } const liboncilla::webots::config::LegSection & WebotsOncillaBackend::LegConfigSection (rci::oncilla::Leg l){ using namespace rci::oncilla; if(l == LEFT_FORE || l == RIGHT_FORE){ return d_config.ForeLeg(); } else { return d_config.HindLeg(); } } diff --git a/src/liboncilla-webots/nodes/Trunk.cpp b/src/liboncilla-webots/nodes/Trunk.cpp index 823ebe2..69646f4 100644 --- a/src/liboncilla-webots/nodes/Trunk.cpp +++ b/src/liboncilla-webots/nodes/Trunk.cpp @@ -1,60 +1,60 @@ /** * \file Trunk.cpp * * \date Jan 22, 2013 * \author tuleu */ #include "Trunk.h" #include <liboncilla-webots/Common.h> namespace liboncilla { namespace webots { Trunk::Trunk(::webots::Node * node) : d_node(node) , d_initialized(0){ if(node == NULL){ throw std::runtime_error("Coquld not find suitable node for teh trunk."); } } Trunk::~Trunk(){ } void Trunk::PostStep(double ts){ const double * posVal(d_node->getPosition()); if(posVal == NULL){ throw std::runtime_error("Could not find Trunk current position."); } - Eigen::Vector3d newPos(d_node->getPosition()); + Eigen::Vector3d newPos(posVal); if(d_initialized == 2){ Eigen::Vector3d newVel = (newPos - d_position) / ts; Eigen::Vector3d accel = (newVel - d_velocity) / ts; d_velocity = newVel; updateTranslationalAcceleration(rci::TranslationalAcceleration::fromM_s2(accel[0],accel[1],accel[2])); } else if(d_initialized == 1){ d_velocity = (newPos - d_position) /ts; updateTranslationalAcceleration(rci::TranslationalAcceleration::fromM_s2(0,0,0)); ++ d_initialized; } else if (d_initialized == 0){ updateTranslationalAcceleration(rci::TranslationalAcceleration::fromM_s2(0,0,0)); ++d_initialized; } d_position = newPos; const double * ori(d_node->getOrientation()); if(ori == NULL){ throw std::runtime_error("Could not find Trunk Orientation."); } updateOrientation(rci::Orientation::fromRotationMatrix(ori[0],ori[1],ori[2], ori[3],ori[4],ori[5], ori[6],ori[7],ori[8])); } } /* namespace webots */ } /* namespace liboncilla */ diff --git a/webots-data/config/liboncilla-webots.config b/webots-data/config/liboncilla-webots.config index 8241e76..414c576 100644 --- a/webots-data/config/liboncilla-webots.config +++ b/webots-data/config/liboncilla-webots.config @@ -1,73 +1,130 @@ [simulation] ## if true willo flood webots console with developper information debug-libwebots = false ## time needed to initialize the position of passive joints init-time = 1.0 ## timestep that will be used to OncillaSynchronier::process() the robot process-loop-time = 0.006 ## contact modelisation section [contact] bounce = 0.5 bounce-velocity = 0.01 coulomb = 1 erp = 0.2 cfm = 5e-03 fds = 0.05 draw = true [fore-leg] ## cfm of the joint cfm = 1e-4 # (default value) ## erp of the joint erp = 0.4 # (default value) ## Diagonal spring property of the leg max-speed = 0.4 # (defaut value) ##margin used internally to compute max stop position od the d1-d2 joint # margin = 0.05 # default value [fore-leg.diagonal-spring] ## damping of the spring damping = 0.1 # (default value) ## precompression of the spring precompression = 0.0034 # (default value) ## maximum length of the spring max-length = 0.01425 # (default value) ## minimum length of the spring min-length = 0.000 # (default value) ## precompression of the spring ## stiffness of the spring stiffness = 7000 # (default value) + +[fore-leg.parallel-spring] + +## damping of the spring +damping = 0.1 # (default value) +## precompression of the spring +precompression = 0.0035 # (default value) +## maximum length of the spring +max-length = 0.0037 # (default value) +## minimum length of the spring +min-length = 0.000 # (default value) +## precompression of the spring +## stiffness of the spring +stiffness = 7410 # (default value) + + +[fore-leg.foot-spring] + +## damping of the spring +damping = 0 # (default value) +## precompression of the spring +precompression = 0.5 # (default value) +## maximum length of the spring +max-length =2.0 # (default value) +## minimum length of the spring +min-length = 0.000 # (default value) +## precompression of the spring +## stiffness of the spring +stiffness = 0.1135 # (default value) + [hind-leg] ## cfm of the joint cfm = 1e-4 # (default value) ## erp of the joint erp = 0.2 # (default value) ## Diagonal spring property of the leg max-speed = 0.4 ##margin used internally to compute max stop position od the d1-d2 joint # margin = 0.05 # default value [hind-leg.diagonal-spring] ## damping of the spring damping = 0.0 # (default value) ## maximum length of the spring max-length = 0.020 # (default value) ## minimum length of the spring min-length = 0.000 # (default value) ## precompression of the spring precompression = 0.0023 # (default value) ## stiffness of the spring stiffness = 5800 # (default value) +[hind-leg.parallel-spring] + +## damping of the spring +damping = 0.1 # (default value) +## precompression of the spring +precompression = 0.0035 # (default value) +## maximum length of the spring +max-length = 0.0037 # (default value) +## minimum length of the spring +min-length = 0.000 # (default value) +## precompression of the spring +## stiffness of the spring +stiffness = 7410 # (default value) + +[hind-leg.foot-spring] + +## damping of the spring +damping = 0 # (default value) +## precompression of the spring +precompression = 0.5 # (default value) +## maximum length of the spring +max-length =2.0 # (default value) +## minimum length of the spring +min-length = 0.000 # (default value) +## precompression of the spring +## stiffness of the spring +stiffness = 0.1135 # (default value) \ No newline at end of file diff --git a/webots-data/controllers/with-cca/Makefile b/webots-data/controllers/with-cca/Makefile index 8693d5d..6a8d5a1 100644 --- a/webots-data/controllers/with-cca/Makefile +++ b/webots-data/controllers/with-cca/Makefile @@ -1,7 +1,7 @@ space := space += -CFLAGS=`pkg-config --cflags liboncilla-webots-0 cca-oncilla` -O3 -LIBRARIES=`pkg-config --libs liboncilla-webots-0 cca-oncilla` +CFLAGS=`pkg-config --cflags liboncilla-0 cca-oncilla` -O3 +LIBRARIES=`pkg-config --libs liboncilla-0 cca-oncilla` WEBOTS_HOME_PATH=$(subst $(space),\ ,$(strip $(subst \,/,$(WEBOTS_HOME)))) include $(WEBOTS_HOME_PATH)/resources/projects/default/controllers/Makefile.include diff --git a/webots-data/controllers/with-rci/Makefile b/webots-data/controllers/with-rci/Makefile index dfb9c11..902d603 100644 --- a/webots-data/controllers/with-rci/Makefile +++ b/webots-data/controllers/with-rci/Makefile @@ -1,7 +1,7 @@ space := space += -CFLAGS=`pkg-config --cflags liboncilla-webots-0` -O3 -LIBRARIES=`pkg-config --libs liboncilla-webots-0` +CFLAGS=`pkg-config --cflags liboncilla-0` -O3 +LIBRARIES=`pkg-config --libs liboncilla-0` WEBOTS_HOME_PATH=$(subst $(space),\ ,$(strip $(subst \,/,$(WEBOTS_HOME)))) include $(WEBOTS_HOME_PATH)/resources/projects/default/controllers/Makefile.include diff --git a/webots-data/worlds/Oncilla-ASLP.wbt b/webots-data/worlds/Oncilla-ASLP.wbt new file mode 100644 index 0000000..86e6196 --- /dev/null +++ b/webots-data/worlds/Oncilla-ASLP.wbt @@ -0,0 +1,2014 @@ +#VRML_SIM V6.0 utf8 +WorldInfo { + info [ + "Description: Oncilla Robot - www.amarsi-project.eu" + "Author: Yvan Bourquin - www.cyberbotics.com - Alexandre Tuleu" + "Date: 01 July 2012" + ] + title "AMARSi Oncilla" + physics "liboncilla-webots-plugin" + basicTimeStep 2 + displayRefresh 20 +} +Viewpoint { + orientation -0.0133898 -0.99971 -0.0200246 1.96271 + position -0.506073 0.0515984 -0.316813 +} +Background { + skyColor [ + 0.4 0.7 1 + ] +} +DirectionalLight { + ambientIntensity 1 + direction 0.5 -2 2 +} +PointLight { + ambientIntensity 1 + location 0.1 0.5 0.3 +} +DEF ONCILLA Supervisor { + translation 0 0.22 0 + rotation 0 1 0 0.001 + children [ + DEF LEFT_FORE_L_0 Servo { + translation 0.175 0 -0.069 + rotation 1 0 0 0 + children [ + DEF LEFT_FORE_L_1 Servo { + translation -0.0625 0 0 + rotation 0 0 1 0.142241 + children [ + DEF LEFT_FORE_P_1 Servo { + translation 0 -0.0465 0.005 + rotation 0 0 1 -0.467557 + children [ + DEF LEFT_FORE_P_2 Servo { + translation 0 -0.0275 0 + rotation 1 0 0 1.5708 + children [ + DEF LEFT_FORE_L_3 Servo { + translation 0 -0.005 0.0275 + rotation 0 1 0 0.467557 + children [ + DEF FORE_L_3_GROUP Group { + children [ + DEF FORE_L_3_LINK Transform { + translation 0 0 0.0385 + rotation 0 0 1 0 + children [ + Shape { + appearance DEF METAL Appearance { + material Material { + diffuseColor 0.45098 0.45098 0.45098 + specularColor 0.870588 0.870588 0.870588 + } + } + geometry Box { + size 0.01 0.006 0.0775 + } + } + ] + } + DEF L_3_TOP_CYLINDER Transform { + rotation 1 0 0 0 + children [ + DEF L_3_CYL_SHAPE Shape { + appearance USE METAL + geometry Cylinder { + height 0.0061 + radius 0.005 + } + } + ] + } + DEF FORE_L_3_BOTTOM_CYLINDER Transform { + translation 0 0 0.0775 + rotation 1 0 0 0 + children [ + USE L_3_CYL_SHAPE + ] + } + ] + } + DEF LEFT_FORE_FOOT Servo { + translation 0 0 0.0775 + rotation 0 1 0 0.872664 + children [ + DEF FOOT_BOUND Group { + children [ + Transform { + translation 0 0 0.016 + rotation 1 0 0 -0 + children [ + Shape { + appearance DEF WHITE_PLASTIC Appearance { + material Material { + diffuseColor 1 1 0.905882 + } + } + geometry Cylinder { + height 0.025 + radius 0.003 + } + } + ] + } + Transform { + translation 0 0 -0.009 + rotation 1 0 0 -0 + children [ + Shape { + appearance DEF WHITE_PLASTIC Appearance { + material Material { + diffuseColor 1 1 0.905882 + } + } + geometry Cylinder { + height 0.025 + radius 0.003872 + } + } + ] + } + Transform { + translation -0.001189 0 0.007728 + rotation 0 1 0 0.142593 + children [ + Shape { + appearance USE WHITE_PLASTIC + geometry Box { + size 0.006 0.025 0.01673 + } + } + ] + } + Transform { + translation -0.001624 0 -0.004394 + rotation 0 1 0 -0.159349 + children [ + Shape { + appearance USE WHITE_PLASTIC + geometry Box { + size 0.006 0.025 0.009608 + } + } + ] + } + ] + } + ] + name "LEFT_FORE_FOOT" + boundingObject USE FOOT_BOUND + physics DEF FOOT_PHYSICS Physics { + } + maxForce 0 + maxStop 2 + } + ] + name "LEFT_FORE_L_3" + boundingObject USE FORE_L_3_LINK + physics DEF FORE_L_3_PHYSICS Physics { + centerOfMass 0 0 0.0385 + } + maxForce 0 + dampingConstant 0.0001 + } + DEF FORE_P_2_BOTTOM_CYLINDER Transform { + translation 0 0 0.0275 + rotation 1 0 0 0 + children [ + DEF P_CYL_SHAPE Shape { + appearance DEF CARBON Appearance { + material Material { + diffuseColor 0.466667 0.466667 0.466667 + specularColor 0.741176 0.741176 0.741176 + } + texture ImageTexture { + url [ + "textures/carbon.png" + ] + } + } + geometry Cylinder { + height 0.00151 + radius 0.003 + } + } + ] + } + DEF FORE_P_2_LINK Transform { + translation 0 0 0.01375 + rotation 1 0 0 -1.5708 + children [ + Shape { + appearance DEF CARBON Appearance { + material Material { + diffuseColor 0.466667 0.466667 0.466667 + specularColor 0.741176 0.741176 0.741176 + } + texture ImageTexture { + url [ + "textures/carbon.png" + ] + } + } + geometry Box { + size 0.006 0.0275 0.0015 + } + } + ] + } + ] + name "LEFT_FORE_P_2" + boundingObject USE FORE_P_2_LINK + physics DEF FORE_P_2_PHYSICS Physics { + centerOfMass 0 0 0.01375 + } + type "linear" + maxForce 0 + controlP 1 + maxStop 0.0037 + } + DEF FORE_P_1_LINK Transform { + translation 0 -0.01375 0 + children [ + Shape { + appearance DEF CARBON Appearance { + material Material { + diffuseColor 0.466667 0.466667 0.466667 + specularColor 0.741176 0.741176 0.741176 + } + texture ImageTexture { + url [ + "textures/carbon.png" + ] + } + } + geometry Box { + size 0.006 0.0275 0.0015 + } + } + ] + } + DEF P_1_TOP_CYLINDER Transform { + rotation 1 0 0 1.5708 + children [ + USE P_CYL_SHAPE + ] + } + ] + name "LEFT_FORE_P_1" + boundingObject USE FORE_P_1_LINK + physics DEF FORE_P_1_PHYSICS Physics { + centerOfMass 0 -0.0275 0 + } + maxForce 0 + dampingConstant 0.0001 + } + DEF LEFT_FORE_D_1 Servo { + translation 0 -0.0465 -0.0175 + rotation 0 0 1 -0.366417 + children [ + DEF D_1_GROUP Group { + children [ + DEF D_1_LINK Transform { + translation 0 -0.00775 0 + children [ + Shape { + appearance DEF WHITE_PLASTIC Appearance { + material Material { + diffuseColor 1 1 0.905882 + } + } + geometry Box { + size 0.011 0.0155 0.011 + } + } + ] + } + DEF D_1_CYL Transform { + rotation 1 0 0 1.5708 + children [ + DEF D_1_CYL_SHAPE Shape { + appearance USE WHITE_PLASTIC + geometry Cylinder { + height 0.01101 + radius 0.0055 + } + } + ] + } + ] + } + DEF LEFT_FORE_D_2 Servo { + translation 0 -0.056 0 + rotation 1 0 0 -1.5708 + children [ + DEF D_2_GROUP Group { + children [ + DEF D_2_LINK Transform { + children [ + Shape { + appearance USE WHITE_PLASTIC + geometry Box { + size 0.011 0.011 0.027 + } + } + ] + } + DEF D_2_CYL_BOTTOM Transform { + translation 0 0 -0.0135 + children [ + Shape { + appearance USE WHITE_PLASTIC + geometry Cylinder { + height 0.01101 + radius 0.0055 + } + } + ] + } + DEF D_2_PIN Transform { + translation 0 0 0.03 + rotation 1 0 0 1.5708 + children [ + Shape { + appearance DEF METAL Appearance { + material Material { + diffuseColor 0.45098 0.45098 0.45098 + specularColor 0.870588 0.870588 0.870588 + } + } + geometry Cylinder { + height 0.06 + radius 0.0015 + } + } + ] + } + ] + } + ] + name "LEFT_FORE_D_2" + boundingObject USE D_2_LINK + physics DEF D_2_PHYSICS Physics { + } + type "linear" + maxForce 0 + maxPosition 0.033 + minStop -0.001 + maxStop 0.0331 + } + ] + name "LEFT_FORE_D_1" + boundingObject USE D_1_LINK + physics DEF D1_PHYSICS Physics { + centerOfMass 0 -0.008 0 + } + maxForce 0 + dampingConstant 0.02 + } + DEF LEFT_FORE_L_1_BOUND Group { + children [ + Transform { + translation 0 0 -0.03 + rotation 1 0 0 1.5708 + children [ + Shape { + appearance USE WHITE_PLASTIC + geometry Cylinder { + height 0.038 + radius 0.018 + } + } + ] + } + Transform { + translation 0 0 0.0125 + rotation 1 0 0 1.5708 + children [ + Shape { + appearance USE WHITE_PLASTIC + geometry Cylinder { + height 0.047 + radius 0.013 + } + } + ] + } + Transform { + translation 0 -0.031 0 + children [ + Shape { + appearance USE WHITE_PLASTIC + geometry Box { + size 0.015 0.062 0.006 + } + } + ] + } + ] + } + DEF LEFT_FORE_L_1_GROUP Group { + children [ + Transform { + translation 0 0 -0.048 + rotation 1 0 0 1.5708 + children [ + Shape { + appearance DEF BLACK_PLASTIC Appearance { + material Material { + diffuseColor 0.117647 0.117647 0.117647 + specularColor 0.262745 0.25098 0.25098 + } + } + geometry Cylinder { + height 0.003 + radius 0.019 + } + } + ] + } + Transform { + translation 0 -0.062 0 + rotation 1 0 0 1.5708 + children [ + Shape { + appearance USE WHITE_PLASTIC + geometry Cylinder { + height 0.0061 + radius 0.0075 + } + } + ] + } + ] + } + DEF LEFT_FORE_L_2 Servo { + translation 0 -0.062 0 + rotation 0 0 1 -0.467557 + children [ + DEF FORE_L2_BOUND Group { + children [ + Transform { + translation 0.002 -0.0275 0.008 + children [ + DEF FORE_L2_LINK Shape { + appearance USE WHITE_PLASTIC + geometry Box { + size 0.008 0.055 0.007 + } + } + ] + } + Transform { + translation 0.002 -0.0275 -0.008 + children [ + USE FORE_L2_LINK + ] + } + Transform { + translation 0.002 -0.0275 0 + children [ + Shape { + appearance USE WHITE_PLASTIC + geometry Box { + size 0.008 0.039 0.009 + } + } + ] + } + ] + } + DEF FORE_L2_CYLS Transform { + rotation 1 0 0 1.5708 + children [ + DEF L2_TOP_CYLS Group { + children [ + Transform { + translation 0 0.008 0 + children [ + DEF L2_CYL_SHAPE Shape { + appearance USE WHITE_PLASTIC + geometry Cylinder { + height 0.0071 + radius 0.006 + } + } + ] + } + Transform { + translation 0 -0.008 0 + children [ + DEF L2_CYL_SHAPE Shape { + appearance USE WHITE_PLASTIC + geometry Cylinder { + height 0.0071 + radius 0.006 + } + } + ] + } + ] + } + Transform { + translation 0 0 0.055 + children [ + USE L2_TOP_CYLS + ] + } + ] + } + ] + name "LEFT_FORE_L_2" + boundingObject USE FORE_L2_BOUND + physics DEF FORE_L_2_PHYSICS Physics { + centerOfMass 0 -0.0275 0 + } + maxForce 0 + minPosition -1.248 + minStop -1.249 + dampingConstant 0.002 + } + ] + name "LEFT_FORE_L_1" + boundingObject USE LEFT_FORE_L_1_BOUND + physics DEF LEFT_L_1_PHYSICS Physics { + density -1 + mass 0.24 + centerOfMass 0 0 0.021 + } + controlP 50 + minPosition -0.872665 + maxPosition 0.872665 + minStop -0.873665 + maxStop 0.873665 + } + DEF LEFT_L_0_GROUP Group { + children [ + Transform { + translation 0 0 0.01875 + children [ + Shape { + appearance DEF CARBON Appearance { + material Material { + diffuseColor 0.466667 0.466667 0.466667 + specularColor 0.741176 0.741176 0.741176 + } + texture ImageTexture { + url [ + "textures/carbon.png" + ] + } + } + geometry Box { + size 0.0015 0.035 0.0545 + } + } + ] + } + Transform { + translation -0.0815 0 0.02875 + children [ + Shape { + appearance USE CARBON + geometry Box { + size 0.0015 0.035 0.0345 + } + } + ] + } + Transform { + translation -0.0565 0 0.011 + children [ + Shape { + appearance USE CARBON + geometry Box { + size 0.113 0.035 0.0015 + } + } + ] + } + Transform { + translation -0.04 0 0.0455 + children [ + Shape { + appearance USE CARBON + geometry Box { + size 0.08 0.035 0.0015 + } + } + ] + } + Transform { + translation -0.117 0 0.003 + children [ + Shape { + geometry Box { + size 0.015 0.012 0.015 + } + } + ] + } + DEF LEFT_L_1_MOTOR Transform { + translation -0.023 0 0.055 + rotation 1 0 0 1.5708 + children [ + DEF L_0_MOTOR_SHAPE Shape { + appearance USE METAL + geometry Cylinder { + height 0.091 + radius 0.011 + } + } + ] + } + ] + } + ] + name "LEFT_FORE_L_0" + boundingObject DEF LEFT_L_0_BOUND Group { + children [ + USE LEFT_L_1_MOTOR + Transform { + translation -0.04 0 0.02875 + children [ + Box { + size 0.08 0.035 0.0345 + } + ] + } + ] + } + physics DEF LEFT_L_0_PHYSICS Physics { + density -1 + mass 0.238 + centerOfMass -0.023 0 0.053 + } + } + DEF RIGHT_FORE_L_0 Servo { + translation 0.175 0 0.069 + rotation 1 0 0 0 + children [ + DEF RIGHT_FORE_L_1 Servo { + translation -0.0625 0 -0.001 + rotation 0 0 1 0.142241 + children [ + DEF RIGHT_FORE_P_1 Servo { + translation 0 -0.0465 -0.005 + rotation 0 0 1 -0.467557 + children [ + DEF RIGHT_FORE_P_2 Servo { + translation 0 -0.0275 0 + rotation 1 0 0 1.5708 + children [ + DEF RIGHT_FORE_L_3 Servo { + translation 0 0.005 0.0275 + rotation 0 1 0 0.467557 + children [ + DEF RIGHT_FORE_FOOT Servo { + translation 0 0 0.0775 + rotation 0 1 0 0.872664 + children [ + USE FOOT_BOUND + ] + name "RIGHT_FORE_FOOT" + boundingObject USE FOOT_BOUND + physics USE FOOT_PHYSICS + maxForce 0 + maxStop 2 + } + USE FORE_L_3_GROUP + ] + name "RIGHT_FORE_L_3" + boundingObject USE FORE_L_3_LINK + physics USE FORE_L_3_PHYSICS + maxForce 0 + dampingConstant 0.0001 + } + USE FORE_P_2_LINK + USE FORE_P_2_BOTTOM_CYLINDER + ] + name "RIGHT_FORE_P_2" + boundingObject USE FORE_P_2_LINK + physics USE FORE_P_2_PHYSICS + type "linear" + maxForce 0 + maxStop 0.0037 + } + USE FORE_P_1_LINK + USE P_1_TOP_CYLINDER + ] + name "RIGHT_FORE_P_1" + boundingObject USE FORE_P_1_LINK + physics USE FORE_P_1_PHYSICS + maxForce 0 + dampingConstant 0.0001 + } + DEF RIGHT_FORE_D_1 Servo { + translation 0 -0.0465 0.0175 + rotation 0 0 1 -0.366417 + children [ + USE D_1_GROUP + DEF RIGHT_FORE_D_2 Servo { + translation 0 -0.056 0 + rotation 1 0 0 -1.5708 + children [ + USE D_2_GROUP + ] + name "RIGHT_FORE_D_2" + boundingObject USE D_2_LINK + physics USE D_2_PHYSICS + type "linear" + maxForce 0 + maxPosition 0.033 + minStop -0.001 + maxStop 0.0331 + } + ] + name "RIGHT_FORE_D_1" + boundingObject USE D_1_LINK + physics USE D1_PHYSICS + maxForce 0 + dampingConstant 0.02 + } + DEF RIGHT_FORE_L_1_BOUND Group { + children [ + Transform { + translation 0 0 0.03 + rotation 1 0 0 1.5708 + children [ + Shape { + appearance DEF WHITE_PLASTIC Appearance { + material Material { + diffuseColor 1 1 0.905882 + } + } + geometry Cylinder { + height 0.038 + radius 0.018 + } + } + ] + } + Transform { + translation 0 0 -0.0125 + rotation 1 0 0 1.5708 + children [ + Shape { + appearance USE WHITE_PLASTIC + geometry Cylinder { + height 0.047 + radius 0.013 + } + } + ] + } + Transform { + translation 0 -0.031 0 + children [ + Shape { + appearance USE WHITE_PLASTIC + geometry Box { + size 0.015 0.062 0.006 + } + } + ] + } + ] + } + DEF RIGHT_FORE_L_1_GROUP Group { + children [ + Transform { + translation 0 0 0.048 + rotation 1 0 0 1.5708 + children [ + Shape { + appearance DEF BLACK_PLASTIC Appearance { + material Material { + diffuseColor 0.117647 0.117647 0.117647 + specularColor 0.262745 0.25098 0.25098 + } + } + geometry Cylinder { + height 0.003 + radius 0.019 + } + } + ] + } + Transform { + translation 0 -0.062 0 + rotation 1 0 0 1.5708 + children [ + Shape { + appearance USE WHITE_PLASTIC + geometry Cylinder { + height 0.0061 + radius 0.0075 + } + } + ] + } + ] + } + DEF RIGHT_FORE_L_2 Servo { + translation 0 -0.062 0 + rotation 0 0 1 -0.467557 + children [ + USE FORE_L2_BOUND + USE FORE_L2_CYLS + ] + name "RIGHT_FORE_L_2" + boundingObject USE FORE_L2_BOUND + physics USE FORE_L_2_PHYSICS + maxForce 0 + minPosition -1.248 + minStop -1.249 + maxStop 0.001 + dampingConstant 0.002 + } + ] + name "RIGHT_FORE_L_1" + boundingObject USE RIGHT_FORE_L_1_BOUND + physics DEF RIGHT_L_1_PHYSICS Physics { + density -1 + mass 0.24 + centerOfMass 0 0 -0.021 + } + controlP 50 + minPosition -0.872665 + maxPosition 0.872665 + minStop -0.873665 + maxStop 0.873665 + } + DEF RIGHT_L0_GROUP Group { + children [ + Transform { + translation -0.125 0 -0.01875 + children [ + Shape { + appearance DEF CARBON Appearance { + material Material { + diffuseColor 0.466667 0.466667 0.466667 + specularColor 0.741176 0.741176 0.741176 + } + texture ImageTexture { + url [ + "textures/carbon.png" + ] + } + } + geometry Box { + size 0.0015 0.035 0.0545 + } + } + ] + } + Transform { + translation -0.0435 0 -0.02875 + children [ + Shape { + appearance USE CARBON + geometry Box { + size 0.0015 0.035 0.0345 + } + } + ] + } + Transform { + translation -0.068 0 -0.011 + children [ + Shape { + appearance USE CARBON + geometry Box { + size 0.113 0.035 0.0015 + } + } + ] + } + Transform { + translation -0.085 0 -0.0455 + children [ + Shape { + appearance USE CARBON + geometry Box { + size 0.08 0.035 0.0015 + } + } + ] + } + Transform { + translation -0.008 0 -0.003 + children [ + Shape { + geometry Box { + size 0.015 0.012 0.015 + } + } + ] + } + DEF RIGHT_L_1_MOTOR Transform { + translation -0.102 0 -0.055 + rotation 1 0 0 1.5708 + children [ + DEF L_0_MOTOR_SHAPE Shape { + appearance DEF METAL Appearance { + material Material { + diffuseColor 0.45098 0.45098 0.45098 + specularColor 0.870588 0.870588 0.870588 + } + } + geometry Cylinder { + height 0.091 + radius 0.011 + } + } + ] + } + ] + } + ] + name "RIGHT_FORE_L_0" + boundingObject DEF RIGHT_L_0_BOUND Group { + children [ + USE RIGHT_L_1_MOTOR + Transform { + translation -0.085 0 -0.02875 + children [ + Box { + size 0.08 0.035 0.0345 + } + ] + } + ] + } + physics DEF RIGHT_L0_PHYSICS Physics { + density -1 + mass 0.238 + centerOfMass -0.102 0 -0.053 + } + } + DEF LEFT_HIND_L_0 Servo { + translation -0.05 0 -0.069 + rotation 1 0 0 0 + children [ + DEF LEFT_HIND_L_1 Servo { + translation -0.0625 0 0.001 + rotation 0 0 1 0.1923 + children [ + DEF LEFT_HIND_P_1 Servo { + translation 0 -0.0645 0.005 + rotation 0 0 1 -0.600477 + children [ + DEF LEFT_HIND_P_2 Servo { + translation 0 -0.0325 0 + rotation 1 0 0 1.5708 + children [ + DEF LEFT_HIND_L_3 Servo { + translation 0 -0.005 0.0325 + rotation 0 1 0 0.600477 + children [ + DEF LEFT_HIND_FOOT Servo { + translation 0 0 0.0705 + rotation 0 1 0 0.872664 + children [ + USE FOOT_BOUND + ] + name "LEFT_HIND_FOOT" + boundingObject USE FOOT_BOUND + physics USE FOOT_PHYSICS + maxForce 0 + maxStop 2 + } + DEF HIND_L_3_GROUP Group { + children [ + USE L_3_TOP_CYLINDER + DEF HIND_L_3_LINK Transform { + translation 0 0 0.03525 + children [ + Shape { + appearance USE METAL + geometry Box { + size 0.01 0.006 0.0705 + } + } + ] + } + Transform { + translation 0 0 0.0705 + rotation 1 0 0 0 + children [ + DEF L_3_CYL_SHAPE Shape { + appearance USE METAL + geometry Cylinder { + height 0.0061 + radius 0.005 + } + } + ] + } + ] + } + ] + name "LEFT_HIND_L_3" + boundingObject USE HIND_L_3_LINK + physics DEF HIND_L_3_PHYSICS Physics { + centerOfMass 0 0 0.03525 + } + maxForce 0 + dampingConstant 0.001 + } + DEF HIND_P_2_LINK Transform { + translation 0 0 0.01625 + children [ + Shape { + appearance USE CARBON + geometry Box { + size 0.006 0.0015 0.0325 + } + } + ] + } + DEF HIND_P_2_BOTTOM_CYLINDER Transform { + translation 0 0 0.0325 + children [ + USE P_CYL_SHAPE + ] + } + ] + name "LEFT_HIND_P_2" + boundingObject USE HIND_P_2_LINK + physics DEF HIND_P_2_PHYSICS Physics { + centerOfMass 0 0 0.01625 + } + type "linear" + maxStop 0.0037 + } + DEF HIND_P_1_LINK Transform { + translation 0 -0.01625 0 + children [ + Shape { + appearance USE CARBON + geometry Box { + size 0.006 0.0325 0.0015 + } + } + ] + } + USE P_1_TOP_CYLINDER + ] + name "LEFT_HIND_P_1" + boundingObject USE HIND_P_1_LINK + physics DEF HIND_P_1_PHYSICS Physics { + centerOfMass 0 -0.01625 0 + } + maxForce 0 + dampingConstant 0.001 + } + DEF LEFT_HIND_D_1 Servo { + translation 0 -0.0645 -0.0175 + rotation 0 0 1 -0.488361 + children [ + USE D_1_GROUP + DEF LEFT_HIND_D_2 Servo { + translation 0 -0.065 0 + rotation 1 0 0 -1.5708 + children [ + USE D_2_GROUP + ] + name "LEFT_HIND_D_2" + boundingObject USE D_2_LINK + physics USE D_2_PHYSICS + type "linear" + maxForce 0 + maxPosition 0.033 + minStop -0.001 + maxStop 0.0331 + dampingConstant 5 + } + ] + name "LEFT_HIND_D_1" + boundingObject USE D_1_LINK + physics USE D1_PHYSICS + maxForce 0 + dampingConstant 0.02 + } + DEF LEFT_HIND_L_1_BOUND Group { + children [ + Transform { + translation 0 0 -0.03 + rotation 1 0 0 1.5708 + children [ + Shape { + appearance DEF WHITE_PLASTIC Appearance { + material Material { + diffuseColor 1 1 0.905882 + } + } + geometry Cylinder { + height 0.038 + radius 0.018 + } + } + ] + } + Transform { + translation 0 0 0.0125 + rotation 1 0 0 1.5708 + children [ + Shape { + appearance USE WHITE_PLASTIC + geometry Cylinder { + height 0.047 + radius 0.013 + } + } + ] + } + Transform { + translation 0 -0.04 0 + children [ + Shape { + appearance USE WHITE_PLASTIC + geometry Box { + size 0.015 0.08 0.006 + } + } + ] + } + ] + } + DEF LEFT_HIND_L_1_GROUP Group { + children [ + Transform { + translation 0 0 -0.048 + rotation 1 0 0 1.5708 + children [ + Shape { + appearance DEF BLACK_PLASTIC Appearance { + material Material { + diffuseColor 0.117647 0.117647 0.117647 + specularColor 0.262745 0.25098 0.25098 + } + } + geometry Cylinder { + height 0.003 + radius 0.019 + } + } + ] + } + Transform { + translation 0 -0.08 0 + rotation 1 0 0 1.5708 + children [ + Shape { + appearance USE WHITE_PLASTIC + geometry Cylinder { + height 0.0061 + radius 0.0075 + } + } + ] + } + ] + } + DEF LEFT_HIND_L_2 Servo { + translation 0 -0.08 0 + rotation 0 0 1 -0.600477 + children [ + DEF HIND_L2_BOUND Group { + children [ + Transform { + translation 0.002 -0.0325 0.008 + children [ + DEF HIND_L2_LINK Shape { + appearance USE WHITE_PLASTIC + geometry Box { + size 0.008 0.065 0.007 + } + } + ] + } + Transform { + translation 0.002 -0.0325 -0.008 + children [ + USE HIND_L2_LINK + ] + } + Transform { + translation 0.002 -0.0325 0 + children [ + Shape { + appearance USE WHITE_PLASTIC + geometry Box { + size 0.008 0.049 0.009 + } + } + ] + } + ] + } + DEF HIND_L2_CYLS Transform { + rotation 1 0 0 1.5708 + children [ + USE L2_TOP_CYLS + Transform { + translation 0 0 0.065 + children [ + USE L2_TOP_CYLS + ] + } + ] + } + ] + name "LEFT_HIND_L_2" + boundingObject USE HIND_L2_BOUND + physics DEF HIND_L_2_PHYSICS Physics { + centerOfMass 0 -0.0325 0 + } + maxForce 0 + minPosition -1.587 + minStop -1.587 + maxStop 0.001 + dampingConstant 0.005 + } + ] + name "LEFT_HIND_L_1" + boundingObject USE LEFT_HIND_L_1_BOUND + physics USE LEFT_L_1_PHYSICS + controlP 50 + minPosition -0.872665 + maxPosition 0.872665 + minStop -0.873665 + maxStop 0.873665 + } + USE LEFT_L_0_GROUP + ] + name "LEFT_HIND_L_0" + boundingObject USE LEFT_L_0_BOUND + physics USE LEFT_L_0_PHYSICS + } + DEF RIGHT_HIND_L_0 Servo { + translation -0.05 0 0.069 + rotation 1 0 0 0 + children [ + DEF RIGHT_HIND_L_1 Servo { + translation -0.0625 0 -0.001 + rotation 0 0 1 0.1923 + children [ + DEF RIGHT_HIND_P_1 Servo { + translation 0 -0.0645 -0.005 + rotation 0 0 1 -0.600477 + children [ + DEF RIGHT_HIND_P_2 Servo { + translation 0 -0.0325 0 + rotation 1 0 0 1.5708 + children [ + DEF RIGHT_HIND_L_3 Servo { + translation 0 0.005 0.0325 + rotation 0 1 0 0.600477 + children [ + DEF RIGHT_HIND_FOOT Servo { + translation 0 0 0.0705 + rotation 0 1 0 0.872664 + children [ + USE FOOT_BOUND + ] + name "RIGHT_HIND_FOOT" + boundingObject USE FOOT_BOUND + physics USE FOOT_PHYSICS + maxForce 0 + maxStop 2 + } + USE HIND_L_3_GROUP + ] + name "RIGHT_HIND_L_3" + boundingObject DEF HIND_L_3_LINK Transform { + translation 0 0 0.03525 + children [ + Shape { + appearance USE METAL + geometry Box { + size 0.01 0.006 0.0705 + } + } + ] + } + physics USE HIND_L_3_PHYSICS + maxForce 0 + dampingConstant 0.001 + } + USE HIND_P_2_LINK + USE HIND_P_2_BOTTOM_CYLINDER + ] + name "RIGHT_HIND_L_3" + boundingObject USE HIND_P_2_LINK + physics USE HIND_P_2_PHYSICS + type "linear" + maxStop 0.0037 + } + USE HIND_P_1_LINK + USE P_1_TOP_CYLINDER + ] + name "RIGHT_HIND_P_1" + boundingObject USE HIND_P_1_LINK + physics USE HIND_P_1_PHYSICS + maxForce 0 + dampingConstant 0.001 + } + DEF RIGHT_HIND_D_1 Servo { + translation 0 -0.0645 0.0175 + rotation 0 0 1 -0.488361 + children [ + USE D_1_GROUP + DEF RIGHT_HIND_D_2 Servo { + translation 0 -0.065 0 + rotation 1 0 0 -1.5708 + children [ + USE D_2_GROUP + ] + name "RIGHT_HIND_D_2" + boundingObject USE D_2_LINK + physics USE D_2_PHYSICS + type "linear" + maxForce 0 + maxPosition 0.033 + minStop -0.001 + maxStop 0.0331 + dampingConstant 5 + } + ] + name "RIGHT_HIND_D_1" + boundingObject USE D_1_LINK + physics USE D1_PHYSICS + maxForce 0 + dampingConstant 0.02 + } + DEF RIGHT_HIND_L_1_BOUND Group { + children [ + Transform { + translation 0 0 0.03 + rotation 1 0 0 1.5708 + children [ + Shape { + appearance USE WHITE_PLASTIC + geometry Cylinder { + height 0.038 + radius 0.018 + } + } + ] + } + Transform { + translation 0 0 -0.0125 + rotation 1 0 0 1.5708 + children [ + Shape { + appearance USE WHITE_PLASTIC + geometry Cylinder { + height 0.047 + radius 0.013 + } + } + ] + } + Transform { + translation 0 -0.04 0 + children [ + Shape { + appearance USE WHITE_PLASTIC + geometry Box { + size 0.015 0.08 0.006 + } + } + ] + } + ] + } + DEF RIGHT_HIND_L_1_GROUP Group { + children [ + Transform { + translation 0 0 0.048 + rotation 1 0 0 1.5708 + children [ + Shape { + appearance DEF BLACK_PLASTIC Appearance { + material Material { + diffuseColor 0.117647 0.117647 0.117647 + specularColor 0.262745 0.25098 0.25098 + } + } + geometry Cylinder { + height 0.003 + radius 0.019 + } + } + ] + } + Transform { + translation 0 -0.08 0 + rotation 1 0 0 1.5708 + children [ + Shape { + appearance USE WHITE_PLASTIC + geometry Cylinder { + height 0.0061 + radius 0.0075 + } + } + ] + } + ] + } + DEF RIGHT_HIND_L_2 Servo { + translation 0 -0.08 0 + rotation 0 0 1 -0.600477 + children [ + USE HIND_L2_BOUND + USE HIND_L2_CYLS + ] + name "RIGHT_HIND_L_2" + boundingObject USE HIND_L2_BOUND + physics USE HIND_L_2_PHYSICS + maxForce 0 + minPosition -1.587 + minStop -1.588 + dampingConstant 0.005 + } + ] + name "RIGHT_HIND_L_1" + boundingObject USE RIGHT_HIND_L_1_BOUND + physics USE RIGHT_L_1_PHYSICS + controlP 50 + minPosition -0.872665 + maxPosition 0.872665 + minStop -0.873665 + maxStop 0.873665 + } + USE RIGHT_L0_GROUP + ] + name "RIGHT_HIND_L_0" + boundingObject USE RIGHT_L_0_BOUND + physics USE RIGHT_L0_PHYSICS + } + DEF TRUNK_SHAPE Transform { + children [ + DEF TRUNK_CBN_SHAPE Transform { + children [ + Transform { + translation 0.10825 0.035 0 + children [ + DEF TRUNK_BAR_HZ Shape { + appearance DEF CARBON Appearance { + material Material { + diffuseColor 0.466667 0.466667 0.466667 + specularColor 0.741176 0.741176 0.741176 + } + texture ImageTexture { + url [ + "textures/carbon.png" + ] + } + } + geometry Box { + size 0.1415 0.01 0.022 + } + } + ] + } + Transform { + translation 0.10825 -0.035 0 + children [ + USE TRUNK_BAR_HZ + ] + } + Transform { + translation -0.10825 -0.035 0 + children [ + USE TRUNK_BAR_HZ + ] + } + Transform { + translation -0.10825 0.035 0 + children [ + USE TRUNK_BAR_HZ + ] + } + Transform { + translation 0.17325 0 0 + children [ + Shape { + appearance USE CARBON + geometry Box { + size 0.0115 0.06 0.022 + } + } + ] + } + Transform { + translation -0.17325 0 0 + children [ + Shape { + appearance USE CARBON + geometry Box { + size 0.0115 0.06 0.022 + } + } + ] + } + Transform { + translation 0.0525 0 0 + children [ + Shape { + appearance USE CARBON + geometry Box { + size 0.01 0.06 0.022 + } + } + ] + } + Transform { + translation -0.0525 0 0 + children [ + Shape { + appearance USE CARBON + geometry Box { + size 0.01 0.06 0.022 + } + } + ] + } + Transform { + translation 0 -0.0175 0 + children [ + Shape { + appearance USE CARBON + geometry Box { + size 0.075 0.135 0.002 + } + } + ] + } + Transform { + translation 0.0575 0.0675 0 + children [ + Shape { + appearance USE CARBON + geometry Box { + size 0.01 0.055 0.002 + } + } + ] + } + Transform { + translation -0.0575 0.0675 0 + children [ + Shape { + appearance USE CARBON + geometry Box { + size 0.01 0.055 0.002 + } + } + ] + } + Transform { + translation 0 0.1 0 + children [ + Shape { + appearance USE CARBON + geometry Box { + size 0.125 0.01 0.002 + } + } + ] + } + Transform { + translation 0.178249 0 0 + children [ + DEF EXT_BUMPER_SHAPE Transform { + children [ + Transform { + children [ + Shape { + appearance USE CARBON + geometry Box { + size 0.0015 0.019 0.152 + } + } + ] + } + Transform { + translation 0.00575 0 0.064 + children [ + DEF BUMPER_END_SHAPE Shape { + appearance USE METAL + geometry Box { + size 0.01 0.01901 0.02401 + } + } + ] + } + Transform { + translation 0.00575 0 -0.064 + children [ + USE BUMPER_END_SHAPE + ] + } + ] + } + ] + } + Transform { + translation -0.17824 0 0 + rotation 0 0 1 3.14159 + children [ + USE EXT_BUMPER_SHAPE + ] + } + Transform { + translation 0.0425 0 0 + children [ + DEF INT_BUMP_SHAPE Transform { + children [ + Transform { + children [ + Shape { + appearance USE METAL + geometry Box { + size 0.00995 0.01 0.15 + } + } + ] + } + Transform { + translation 0 0 0.064 + children [ + USE BUMPER_END_SHAPE + ] + } + Transform { + translation 0 0 -0.064 + children [ + USE BUMPER_END_SHAPE + ] + } + ] + } + ] + } + Transform { + translation -0.0425 0 0 + children [ + USE INT_BUMP_SHAPE + ] + } + Transform { + translation 0 0.103 0 + rotation 0 0 1 1.5708 + children [ + Shape { + appearance USE WHITE_PLASTIC + geometry Cylinder { + height 0.1 + radius 0.007 + } + } + ] + } + ] + } + DEF CIRCUITS_GROUP Transform { + translation 0 -0.0175 0 + children [ + DEF MDV_BOARD_1 Transform { + translation 0 0 -0.006 + children [ + DEF MDV_BOARD_SHAPE Group { + children [ + DEF MDV_PCB_SHAPE Transform { + children [ + Shape { + appearance Appearance { + texture ImageTexture { + url [ + "textures/pcb.jpg" + ] + } + } + geometry Box { + size 0.06 0.134 0.0015 + } + } + ] + } + DEF MDV_BOARD_CONNECTOR Transform { + translation 0 0.071 -0.003 + children [ + DEF MDVV_BOARD_CONNECTOR Shape { + appearance DEF BLACK_PLASTIC Appearance { + material Material { + diffuseColor 0.117647 0.117647 0.117647 + specularColor 0.262745 0.25098 0.25098 + } + } + geometry Box { + size 0.042 0.009 0.009 + } + } + ] + } + ] + } + ] + } + DEF MDV_BOARD_2 Transform { + translation 0 0 -0.016 + children [ + DEF MDV_BOARD_SHAPE Group { + children [ + DEF MDV_PCB_SHAPE Transform { + children [ + Shape { + appearance Appearance { + texture ImageTexture { + url [ + "textures/pcb.jpg" + ] + } + } + geometry Box { + size 0.06 0.134 0.0015 + } + } + ] + } + DEF MDV_BOARD_CONNECTOR Transform { + translation 0 0.071 -0.003 + children [ + DEF MDVV_BOARD_CONNECTOR Shape { + appearance USE BLACK_PLASTIC + geometry Box { + size 0.042 0.009 0.009 + } + } + ] + } + ] + } + ] + } + DEF MDV_BOARD_3 Transform { + translation 0 0 0.006 + rotation 0 1 0 -9.42478 + children [ + DEF MDV_BOARD_SHAPE Group { + children [ + DEF MDV_PCB_SHAPE Transform { + children [ + Shape { + appearance Appearance { + texture ImageTexture { + url [ + "textures/pcb.jpg" + ] + } + } + geometry Box { + size 0.06 0.134 0.0015 + } + } + ] + } + DEF MDV_BOARD_CONNECTOR Transform { + translation 0 0.071 -0.003 + children [ + DEF MDVV_BOARD_CONNECTOR Shape { + appearance USE BLACK_PLASTIC + geometry Box { + size 0.042 0.009 0.009 + } + } + ] + } + ] + } + ] + } + DEF MDV_BOARD_4 Transform { + translation 0 0 0.016 + rotation 0 1 0 3.14159 + children [ + DEF MDV_BOARD_SHAPE Group { + children [ + DEF MDV_PCB_SHAPE Transform { + children [ + Shape { + appearance Appearance { + texture ImageTexture { + url [ + "textures/pcb.jpg" + ] + } + } + geometry Box { + size 0.06 0.134 0.0015 + } + } + ] + } + DEF MDV_BOARD_CONNECTOR Transform { + translation 0 0.071 -0.003 + children [ + DEF MDVV_BOARD_CONNECTOR Shape { + appearance USE BLACK_PLASTIC + geometry Box { + size 0.042 0.009 0.009 + } + } + ] + } + ] + } + ] + } + ] + } + DEF RIGHT_FORE_SERVO Transform { + translation 0.1015 -0.0685 0.0115 + children [ + DEF SERVO_SHAPE Group { + children [ + Shape { + appearance USE BLACK_PLASTIC + geometry Box { + size 0.038 0.041 0.02 + } + } + Shape { + appearance USE BLACK_PLASTIC + geometry Box { + size 0.025 0.057 0.0199 + } + } + Transform { + translation 0.023 0.011 0 + rotation 0 0 1 1.5708 + children [ + Shape { + appearance DEF BLUE_METAL Appearance { + material Material { + diffuseColor 0 0.482353 1 + shininess 0.12 + specularColor 0 1 0.988235 + } + } + geometry Cylinder { + height 0.002 + radius 0.01 + } + } + Transform { + translation 0 0.002 0 + children [ + Shape { + appearance USE BLUE_METAL + geometry Cylinder { + height 0.004 + radius 0.005 + } + } + ] + } + Transform { + translation 0 -0.004 0 + children [ + Shape { + appearance USE WHITE_PLASTIC + geometry Cylinder { + height 0.006 + radius 0.01 + } + } + ] + } + Transform { + translation 0.025 -0.01 0.008 + rotation 0 1 0 -0.1 + children [ + Shape { + appearance USE WHITE_PLASTIC + geometry Box { + size 0.04 0.006 0.012 + } + } + Transform { + translation -0.02 0 0 + children [ + Shape { + appearance USE WHITE_PLASTIC + geometry Cylinder { + height 0.0059 + radius 0.006 + } + } + ] + } + Transform { + translation 0.02 0 0 + children [ + Shape { + appearance USE WHITE_PLASTIC + geometry Cylinder { + height 0.0059 + radius 0.006 + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + DEF LEFT_FORE_SERVO Transform { + translation 0.1215 -0.0685 -0.0115 + rotation 0 1 0 3.14159 + children [ + USE SERVO_SHAPE + ] + } + DEF RIGHT_HIND_SERVO Transform { + translation -0.1215 -0.0685 0.0115 + children [ + USE SERVO_SHAPE + ] + } + DEF LEFT_HIND_SERVO Transform { + translation -0.1015 -0.0685 -0.0115 + rotation 0 1 0 3.14159 + children [ + USE SERVO_SHAPE + ] + } + ] + } + ] + boundingObject DEF TRUNK_BOUNDARIES Group { + children [ + Transform { + translation 0 -0.0285 0 + children [ + Box { + size 0.358 0.137 0.022 + } + ] + } + ] + } + physics DEF TRUNK_PHYSICS Physics { + density -1 + mass 1.05 + centerOfMass 0 -0.035 0 + } + controller "TestController" +} +DEF GROUND Solid { + translation 0 -0.1 0 + children [ + DEF FLOOR_SHAPE Shape { + appearance Appearance { + material Material { + } + texture ImageTexture { + url [ + "textures/floor.jpg" + ] + } + textureTransform TextureTransform { + scale 200 200 + } + } + geometry Box { + size 40 0.2 40 + } + } + ] + boundingObject USE FLOOR_SHAPE +} +DEF STAND Solid { + translation 0 -1.06 0 + children [ + DEF STAND_SHAPE Shape { + geometry Box { + size 0.4 0.12 0.05 + } + } + ] + boundingObject USE STAND_SHAPE +}