Skip to content
Snippets Groups Projects
Commit a8919d24 authored by Florent Lamiraux's avatar Florent Lamiraux
Browse files

Data specific to hrp2 for hpp-corbaserver.

parents
No related branches found
No related tags found
No related merge requests found
[submodule "cmake"]
path = cmake
url = git://github.com/jrl-umi3218/jrl-cmakemodules.git
# Copyright (c) 2014 CNRS
# Author: Florent Lamiraux
#
# This file is part of hpp-corbaserver.
# hpp-corbaserver is free software: you can redistribute it
# and/or modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation, either version
# 3 of the License, or (at your option) any later version.
#
# hpp-corbaserver 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 Lesser Public License for more details. You should have
# received a copy of the GNU Lesser General Public License along with
# hpp-corbaserver. If not, see
# <http://www.gnu.org/licenses/>.
# Requires at least CMake 2.6 to configure the package.
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
INCLUDE(cmake/base.cmake)
INCLUDE(cmake/python.cmake)
SET(PROJECT_NAME hpp-hrp2)
SET(PROJECT_DESCRIPTION "Data specific to hrp2 robot for hpp-corbaserver")
SET(PROJECT_URL "")
SETUP_PROJECT()
FINDPYTHON()
ADD_REQUIRED_DEPENDENCY ("hpp-corbaserver >= 3")
INSTALL(FILES ${PROJECT_SOURCE_DIR}/src/hpp/corbaserver/hrp2/robot.py
DESTINATION ${PYTHON_SITELIB}/hpp/corbaserver/hrp2
)
SETUP_PROJECt_FINALIZE()
Data specific to robot hrp2 for hpp-corbaserver.
\ No newline at end of file
Subproject commit c4377b88bff0dd8abd1f2816fd956e620504eb45
#!/usr/bin/env python
# Copyright (c) 2014 CNRS
# Author: Florent Lamiraux
#
# This file is part of hpp-corbaserver.
# hpp-corbaserver is free software: you can redistribute it
# and/or modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation, either version
# 3 of the License, or (at your option) any later version.
#
# hpp-corbaserver 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 Lesser Public License for more details. You should have
# received a copy of the GNU Lesser General Public License along with
# hpp-corbaserver. If not, see
# <http://www.gnu.org/licenses/>.
from hpp.corbaserver.robot import Robot as Parent
class Robot (Parent):
urdfName = "hrp2_14"
urdfSuffix = ""
srdfSuffix = ""
halfSitting = \
{"base_joint_x": 0.0,
"base_joint_y": 0.0,
"base_joint_z": 0.648702,
"base_joint_SO3": (1.0, 0.0, 0.0, 0.0),
"CHEST_JOINT0": 0.0,
"CHEST_JOINT1": 0.0,
"HEAD_JOINT0": 0.0,
"HEAD_JOINT1": 0.0,
"LARM_JOINT0": 0.261799,
"LARM_JOINT1": 0.17453,
"LARM_JOINT2": 0.0,
"LARM_JOINT3": -0.523599,
"LARM_JOINT4": 0.0,
"LARM_JOINT5": 0.0,
"LARM_JOINT6": 0.1,
"LHAND_JOINT0": 0.0,
"LHAND_JOINT1": 0.0,
"LHAND_JOINT2": 0.0,
"LHAND_JOINT3": 0.0,
"LHAND_JOINT4": 0.0,
"RARM_JOINT0": 0.261799,
"RARM_JOINT1": -0.17453,
"RARM_JOINT2": 0.0,
"RARM_JOINT3": -0.523599,
"RARM_JOINT4": 0.0,
"RARM_JOINT5": 0.0,
"RARM_JOINT6": 0.1,
"RHAND_JOINT0": 0.0,
"RHAND_JOINT1": 0.0,
"RHAND_JOINT2": 0.0,
"RHAND_JOINT3": 0.0,
"RHAND_JOINT4": 0.0,
"LLEG_JOINT0": 0.0,
"LLEG_JOINT1": 0.0,
"LLEG_JOINT2": -0.453786,
"LLEG_JOINT3": 0.872665,
"LLEG_JOINT4": -0.418879,
"LLEG_JOINT5": 0.0,
"RLEG_JOINT0": 0.0,
"RLEG_JOINT1": 0.0,
"RLEG_JOINT2": -0.453786,
"RLEG_JOINT3": 0.872665,
"RLEG_JOINT4": -0.418879,
"RLEG_JOINT5": 0.0
}
def __init__ (self):
Parent.__init__ (self, "freeflyer", self.urdfName, self.urdfSuffix,
self.srdfSuffix)
def getInitialConfig (self):
q = []
for n in self.jointNames:
dof = self.halfSitting [n]
if type (dof) is tuple:
q += dof
else:
q.append (dof)
return q
def leftHandClosed (self) :
dofs = {"LARM_JOINT6": 0.1,
"LHAND_JOINT0": 0.0,
"LHAND_JOINT1": 0.0,
"LHAND_JOINT2": 0.0,
"LHAND_JOINT3": 0.0,
"LHAND_JOINT4": 0.0}
res = []
for name, value in dofs.iteritems ():
res.append ((self.rankInConfiguration [name], value))
return res
def rightHandClosed (self) :
dofs = {"RARM_JOINT6": 0.1,
"RHAND_JOINT0": 0.0,
"RHAND_JOINT1": 0.0,
"RHAND_JOINT2": 0.0,
"RHAND_JOINT3": 0.0,
"RHAND_JOINT4": 0.0}
res = []
for name, value in dofs.iteritems ():
res.append ((self.rankInConfiguration [name], value))
return res
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment