Commit 5c16585c authored by jcarpent's avatar jcarpent
Browse files

[All] Update Romeo model path

parent 528ae5ab
......@@ -65,7 +65,7 @@ int main()
std::string romeo_filename = PINOCCHIO_SOURCE_DIR"/models/romeo/urdf/romeo.urdf";
std::string romeo_filename = PINOCCHIO_SOURCE_DIR"/models/romeo/romeo_description/urdf/romeo.urdf";
std::vector < std::string > package_dirs;
std::string romeo_meshDir = PINOCCHIO_SOURCE_DIR"/models/";
package_dirs.push_back(romeo_meshDir);
......
<?xml version="1.0" ?>
<!--This does not replace URDF, and is not an extension of URDF.
This is a format for representing semantic information about the robot structure.
A URDF file must exist for this robot as well, where the joints and the links that are referenced are defined
-->
<robot name="romeo">
<rotor_params>
<joint name="WAIST_P" mass="1.0" gear_ratio="0.0" />
<joint name="WAIST_R" mass="0.0" gear_ratio="1.0" />
<joint name="CHEST" mass="0.0" gear_ratio="0.0" />
<joint name="LARM_SHOULDER_P" mass="0.0" gear_ratio="0.0" />
<joint name="LARM_SHOULDER_R" mass="0.0" gear_ratio="0.0" />
<joint name="LARM_SHOULDER_Y" mass="0.0" gear_ratio="0.0" />
<joint name="LARM_ELBOW" mass="0.0" gear_ratio="0.0" />
<joint name="LARM_WRIST_Y" mass="0.0" gear_ratio="0.0" />
<joint name="LARM_WRIST_P" mass="0.0" gear_ratio="0.0" />
<joint name="LARM_WRIST_R" mass="0.0" gear_ratio="0.0" />
<joint name="RARM_SHOULDER_P" mass="0.0" gear_ratio="0.0" />
<joint name="RARM_SHOULDER_R" mass="0.0" gear_ratio="0.0" />
<joint name="RARM_SHOULDER_Y" mass="0.0" gear_ratio="0.0" />
<joint name="RARM_ELBOW" mass="0.0" gear_ratio="0.0" />
<joint name="RARM_WRIST_Y" mass="0.0" gear_ratio="0.0" />
<joint name="RARM_WRIST_P" mass="0.0" gear_ratio="0.0" />
<joint name="RARM_WRIST_R" mass="0.0" gear_ratio="0.0" />
<joint name="LLEG_HIP_R" mass="0.0" gear_ratio="0.0" />
<joint name="LLEG_HIP_P" mass="0.0" gear_ratio="0.0" />
<joint name="LLEG_HIP_Y" mass="0.0" gear_ratio="0.0" />
<joint name="LLEG_KNEE" mass="0.0" gear_ratio="0.0" />
<joint name="LLEG_ANKLE_P" mass="0.0" gear_ratio="0.0" />
<joint name="LLEG_ANKLE_R" mass="0.0" gear_ratio="0.0" />
<joint name="RLEG_HIP_R" mass="0.0" gear_ratio="0.0" />
<joint name="RLEG_HIP_P" mass="0.0" gear_ratio="0.0" />
<joint name="RLEG_HIP_Y" mass="0.0" gear_ratio="0.0" />
<joint name="RLEG_KNEE" mass="0.0" gear_ratio="0.0" />
<joint name="RLEG_ANKLE_P" mass="0.0" gear_ratio="0.0" />
<joint name="RLEG_ANKLE_R" mass="0.0" gear_ratio="0.0" />
</rotor_params>
</robot>
......@@ -18,7 +18,7 @@ class TestFrameBindings(unittest.TestCase):
m4ones = eye(4)
current_file = os.path.dirname(os.path.abspath(__file__))
pinocchio_models_dir = os.path.abspath(os.path.join(current_file, '../models/romeo'))
pinocchio_models_dir = os.path.abspath(os.path.join(current_file, '../models/romeo/romeo_description'))
romeo_model_path = os.path.abspath(os.path.join(pinocchio_mdoels_dir, '/urdf/romeo.urdf'))
hint_list = [pinocchio_models_dir, "wrong/hint"] # hint list
robot = RobotWrapper(romeo_model_path, hint_list, se3.JointModelFreeFlyer())
......
......@@ -19,7 +19,7 @@ class TestGeometryObjectBindings(unittest.TestCase):
current_file = os.path.dirname(os.path.abspath(__file__))
pinocchio_models_dir = os.path.abspath(os.path.join(current_file, '../models/romeo'))
pinocchio_models_dir = os.path.abspath(os.path.join(current_file, '../models/romeo/romeo_description'))
romeo_model_path = os.path.abspath(pinocchio_models_dir, '/urdf/romeo.urdf')
hint_list = [pinocchio_models_dir, "wrong/hint"] # hint list
robot = RobotWrapper(romeo_model_path, hint_list, se3.JointModelFreeFlyer())
......
......@@ -6,7 +6,7 @@ import os
from pinocchio.robot_wrapper import RobotWrapper
# Warning : the paths are here hard-coded. This file is only here as an example
romeo_model_path = os.path.abspath(os.path.join(current_file, '../models/romeo'))
romeo_model_path = os.path.abspath(os.path.join(current_file, '../models/romeo/romeo_description'))
romeo_model_file = romeo_model_path + "/urdf/romeo.urdf"
list_hints = [romeo_model_path,"titi"]
......
......@@ -215,7 +215,7 @@ BOOST_AUTO_TEST_CASE ( loading_model )
typedef se3::GeometryData GeometryData;
std::string filename = PINOCCHIO_SOURCE_DIR"/models/romeo/urdf/romeo.urdf";
std::string filename = PINOCCHIO_SOURCE_DIR"/models/romeo/romeo_description/urdf/romeo.urdf";
std::vector < std::string > packageDirs;
std::string meshDir = PINOCCHIO_SOURCE_DIR"/models/romeo/";
packageDirs.push_back(meshDir);
......@@ -249,7 +249,7 @@ BOOST_AUTO_TEST_CASE (radius)
std::string filename = ROMEO_DESCRIPTION_MODEL_DIR"/romeo_description/urdf/romeo_small.urdf";
packageDirs.push_back(ROMEO_DESCRIPTION_MODEL_DIR);
#else
std::string filename = PINOCCHIO_SOURCE_DIR"/models/romeo/urdf/romeo.urdf";
std::string filename = PINOCCHIO_SOURCE_DIR"/models/romeo/romeo_description/urdf/romeo.urdf";
std::string meshDir = PINOCCHIO_SOURCE_DIR"/models/romeo/";
packageDirs.push_back(meshDir);
#endif // ROMEO_DESCRIPTION_MODEL_DIR
......@@ -326,7 +326,7 @@ BOOST_AUTO_TEST_CASE ( romeo_joints_meshes_positions )
std::string filename = ROMEO_DESCRIPTION_MODEL_DIR"/romeo_description/urdf/romeo_small.urdf";
packageDirs.push_back(ROMEO_DESCRIPTION_MODEL_DIR);
#else
std::string filename = PINOCCHIO_SOURCE_DIR"/models/romeo/urdf/romeo.urdf";
std::string filename = PINOCCHIO_SOURCE_DIR"/models/romeo/romeo_description/urdf/romeo.urdf";
std::string meshDir = PINOCCHIO_SOURCE_DIR"/models/romeo/";
packageDirs.push_back(meshDir);
#endif // ROMEO_DESCRIPTION_MODEL_DIR
......@@ -436,7 +436,7 @@ BOOST_AUTO_TEST_CASE ( hrp2_mesh_distance)
std::string filename = ROMEO_DESCRIPTION_MODEL_DIR"/romeo_description/urdf/romeo_small.urdf";
packageDirs.push_back(ROMEO_DESCRIPTION_MODEL_DIR);
#else
std::string filename = PINOCCHIO_SOURCE_DIR"/models/romeo/urdf/romeo.urdf";
std::string filename = PINOCCHIO_SOURCE_DIR"/models/romeo/romeo_description/urdf/romeo.urdf";
std::string meshDir = PINOCCHIO_SOURCE_DIR"/models/romeo/";
packageDirs.push_back(meshDir);
#endif // ROMEO_DESCRIPTION_MODEL_DIR
......
......@@ -32,9 +32,9 @@ BOOST_AUTO_TEST_CASE(removeCollisionPairs)
{
using namespace se3::urdf;
using namespace se3::srdf;
const string model_filename = PINOCCHIO_SOURCE_DIR"/models/romeo/urdf/romeo.urdf";
const string model_filename = PINOCCHIO_SOURCE_DIR"/models/romeo/romeo_description/urdf/romeo_small.urdf";
const string model_dir = PINOCCHIO_SOURCE_DIR"/models/romeo";
const string srdf_filename = PINOCCHIO_SOURCE_DIR"/models/romeo/srdf/romeo_collision.srdf";
const string srdf_filename = PINOCCHIO_SOURCE_DIR"/models/romeo/romeo_description/srdf/romeo.srdf";
Model model;
buildModel(model_filename, model);
......@@ -57,8 +57,8 @@ BOOST_AUTO_TEST_CASE(readNeutralConfig)
{
using namespace se3::urdf;
using namespace se3::srdf;
const string model_filename = PINOCCHIO_SOURCE_DIR"/models/romeo/urdf/romeo.urdf";
const string srdf_filename = PINOCCHIO_SOURCE_DIR"/models/romeo/srdf/romeo_collision.srdf";
const string model_filename = PINOCCHIO_SOURCE_DIR"/models/romeo/romeo_description/urdf/romeo_small.urdf";
const string srdf_filename = PINOCCHIO_SOURCE_DIR"/models/romeo/romeo_description/srdf/romeo.srdf";
Model model;
buildModel(model_filename, model);
......@@ -73,16 +73,16 @@ BOOST_AUTO_TEST_CASE(readRotorParams)
{
using namespace se3::urdf;
using namespace se3::srdf;
const string model_filename = PINOCCHIO_SOURCE_DIR"/models/romeo/urdf/romeo.urdf";
const string srdf_filename = PINOCCHIO_SOURCE_DIR"/models/romeo/srdf/romeo_collision.srdf";
const string model_filename = PINOCCHIO_SOURCE_DIR"/models/simple_humanoid.urdf";
const string srdf_filename = PINOCCHIO_SOURCE_DIR"/models/simple_humanoid.srdf";
Model model;
buildModel(model_filename, model);
loadRotorParamsFromSrdf(model,srdf_filename,false);
BOOST_CHECK(model.rotorInertia(model.joints[model.getJointId("HeadPitch")].idx_v())==1.0);
BOOST_CHECK(model.rotorGearRatio(model.joints[model.getJointId("HeadRoll")].idx_v())==1.0);
BOOST_CHECK(model.rotorInertia(model.joints[model.getJointId("WAIST_P")].idx_v())==1.0);
BOOST_CHECK(model.rotorGearRatio(model.joints[model.getJointId("WAIST_R")].idx_v())==1.0);
}
BOOST_AUTO_TEST_SUITE_END()
......@@ -31,7 +31,7 @@ BOOST_AUTO_TEST_SUITE ( BOOST_TEST_MODULE )
BOOST_AUTO_TEST_CASE ( build_model )
{
const std::string filename = PINOCCHIO_SOURCE_DIR"/models/romeo/urdf/romeo.urdf";
const std::string filename = PINOCCHIO_SOURCE_DIR"/models/romeo/romeo_description/urdf/romeo_small.urdf";
const std::string dir = PINOCCHIO_SOURCE_DIR"/models/romeo";
se3::Model model;
......@@ -44,7 +44,7 @@ BOOST_AUTO_TEST_CASE ( build_model )
BOOST_AUTO_TEST_CASE ( build_model_from_XML )
{
const std::string filename = PINOCCHIO_SOURCE_DIR"/models/romeo/urdf/romeo.urdf";
const std::string filename = PINOCCHIO_SOURCE_DIR"/models/romeo/romeo_description/urdf/romeo_small.urdf";
// Read file as XML
std::ifstream file;
......@@ -60,7 +60,7 @@ BOOST_AUTO_TEST_CASE ( build_model_from_XML )
BOOST_AUTO_TEST_CASE ( build_model_from_UDRFTree )
{
const std::string filename = PINOCCHIO_SOURCE_DIR"/models/romeo/urdf/romeo.urdf";
const std::string filename = PINOCCHIO_SOURCE_DIR"/models/romeo/romeo_description/urdf/romeo_small.urdf";
::urdf::ModelInterfaceSharedPtr urdfTree = ::urdf::parseURDFFile(filename);
......@@ -72,7 +72,7 @@ BOOST_AUTO_TEST_CASE ( build_model_from_UDRFTree )
BOOST_AUTO_TEST_CASE ( build_model_with_joint )
{
const std::string filename = PINOCCHIO_SOURCE_DIR"/models/romeo/urdf/romeo.urdf";
const std::string filename = PINOCCHIO_SOURCE_DIR"/models/romeo/romeo_description/urdf/romeo_small.urdf";
const std::string dir = PINOCCHIO_SOURCE_DIR"/models/romeo";
se3::Model model;
......@@ -85,7 +85,7 @@ BOOST_AUTO_TEST_CASE ( build_model_with_joint )
BOOST_AUTO_TEST_CASE ( build_model_with_joint_from_XML )
{
const std::string filename = PINOCCHIO_SOURCE_DIR"/models/romeo/urdf/romeo.urdf";
const std::string filename = PINOCCHIO_SOURCE_DIR"/models/romeo/romeo_description/urdf/romeo_small.urdf";
// Read file as XML
std::ifstream file;
......@@ -101,7 +101,7 @@ BOOST_AUTO_TEST_CASE ( build_model_with_joint_from_XML )
BOOST_AUTO_TEST_CASE ( build_model_with_joint_from_UDRFTree )
{
const std::string filename = PINOCCHIO_SOURCE_DIR"/models/romeo/urdf/romeo.urdf";
const std::string filename = PINOCCHIO_SOURCE_DIR"/models/romeo/romeo_description/urdf/romeo_small.urdf";
::urdf::ModelInterfaceSharedPtr urdfTree = ::urdf::parseURDFFile(filename);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment