Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

urdf reading core dump #12

Closed
gchenfc opened this issue Aug 31, 2020 · 4 comments · Fixed by #111
Closed

urdf reading core dump #12

gchenfc opened this issue Aug 31, 2020 · 4 comments · Fixed by #111

Comments

@gchenfc
Copy link
Member

gchenfc commented Aug 31, 2020

This issue was imported from github.gatech.edu.
The original issue was opened by @mxie32 on 2020-05-23T04:50:45Z

create example in scripts folder, the following code will result in core dump:
auto robot = Robot("../../urdfs/fetch.urdf");
however, the following works:
auto robot = Robot("../../urdfs/vision60.urdf");

(gdb) bt
#0  Eigen::internal::call_dense_assignment_loop<Eigen::Matrix<double, 3, 3, 0, 3, 3>, Eigen::Matrix<double, 3, 3, 0, 3, 3>, Eigen::internal::assign_op<double, double> > (dst=..., src=..., func=...)
    at ~/lib_install/include/gtsam/3rdparty/Eigen/Eigen/src/Core/AssignEvaluator.h:741
#1  0x00007ffff7b9c52e in Eigen::internal::Assignment<Eigen::Matrix<double, 3, 3, 0, 3, 3>, Eigen::Matrix<double, 3, 3, 0, 3, 3>, Eigen::internal::assign_op<double, double>, Eigen::internal::Dense2Dense, void>::run (func=..., src=..., dst=...)
    at ~/lib_install/include/gtsam/3rdparty/Eigen/Eigen/src/Core/AssignEvaluator.h:879
#2  Eigen::internal::call_assignment_no_alias<Eigen::Matrix<double, 3, 3, 0, 3, 3>, Eigen::Matrix<double, 3, 3, 0, 3, 3>, Eigen::internal::assign_op<double, double> > (func=..., src=..., dst=...)
    at ~/lib_install/include/gtsam/3rdparty/Eigen/Eigen/src/Core/AssignEvaluator.h:836
#3  Eigen::internal::call_assignment<Eigen::Matrix<double, 3, 3, 0, 3, 3>, Eigen::Matrix<double, 3, 3, 0, 3, 3>, Eigen::internal::assign_op<double, double> >(Eigen::Matrix<double, 3, 3, 0, 3, 3>&, Eigen::Matrix<double, 3, 3, 0, 3, 3> const&, Eigen::internal::assign_op<double, double> const&, Eigen::internal::enable_if<!Eigen::internal::evaluator_assume_aliasing<Eigen::Matrix<double, 3, 3, 0, 3, 3>, Eigen::internal::evaluator_traits<Eigen::Matrix<double, 3, 3, 0, 3, 3> >::Shape>::value, void*>::type) (func=..., src=..., 
    dst=...)
    at ~/lib_install/include/gtsam/3rdparty/Eigen/Eigen/src/Core/AssignEvaluator.h:804
#4  Eigen::internal::call_assignment<Eigen::Matrix<double, 3, 3, 0, 3, 3>, Eigen::Matrix<double, 3, 3, 0, 3, 3> > (src=..., dst=...)
    at ~/lib_install/include/gtsam/3rdparty/Eigen/Eigen/src/Core/AssignEvaluator.h:782
#5  Eigen::PlainObjectBase<Eigen::Matrix<double, 3, 3, 0, 3, 3> >::_set<Eigen::Matrix<double, 3, 3, 0, 3, 3> > (other=..., this=0x7fffffffd388)
    at ~/lib_install/include/gtsam/3rdparty/Eigen/Eigen/src/Core/PlainObjectBase.h:714
#6  Eigen::Matrix<double, 3, 3, 0, 3, 3>::operator=
    (other=..., this=0x7fffffffd388)
    at ~/lib_install/include/gtsam/3rdparty/Eigen/Eigen/src/Core/Matrix.h:208
#7  gtsam::SO<3>::operator= (this=0x7fffffffd388)
    at ~/lib_install/include/gtsam/geometry/SOn.h:50
#8  gtsam::Rot3::operator= (this=0x7fffffffd380)
    at ~/lib_install/include/gtsam/geometry/Rot3.h:59
#9  gtsam::Pose3::operator= (this=0x7fffffffd380)
    at ~/lib_install/include/gtsam/geometry/Pose3.h:37
#10 gtdynamics::Joint::Joint (
    this=this@entry=0x7fffffffd320, sdf_joint=..., 
---Type <return> to continue, or q <return> to quit---
    parent_link=std::shared_ptr<gtdynamics::Link> (use count 8, weak count 1) = {...}, 
    child_link=std::shared_ptr<gtdynamics::Link> (empty) = {...})
    at ~/CS/Research/code/GTDynamics/gtdynamics/universal_robot/Joint.h:155
#11 0x00007ffff7b9ef3c in gtdynamics::ScrewJointBase::ScrewJointBase (this=this@entry=0x7fffffffd320, 
    sdf_joint=..., jScrewAxis=..., 
    joint_effort_type=joint_effort_type@entry=gtdynamics::Joint::Actuated, 
    springCoefficient=springCoefficient@entry=0, 
    jointLimitThreshold=jointLimitThreshold@entry=0, velocityLimitThreshold=velocityLimitThreshold@entry=0, accelerationLimit=accelerationLimit@entry=10000, 
    accelerationLimitThreshold=accelerationLimitThreshold@entry=0, 
    torqueLimitThreshold=torqueLimitThreshold@entry=0, 
    parent_link=std::shared_ptr<gtdynamics::Link> (use count 8, weak count 1) = {...}, 
    child_link=std::shared_ptr<gtdynamics::Link> (empty) = {...})
    at ~/CS/Research/code/GTDynamics/gtdynamics/universal_robot/ScrewJointBase.h:123
#12 0x00007ffff7b9027b in gtdynamics::PrismaticJoint::PrismaticJoint (
    child_link=std::shared_ptr<gtdynamics::Link> (empty) = {...}, 
    parent_link=std::shared_ptr<gtdynamics::Link> (empty) = {...}, torqueLimitThreshold=<optimized out>, 
    accelerationLimitThreshold=<optimized out>, 
    accelerationLimit=<optimized out>, 
    velocityLimitThreshold=<optimized out>, 
    jointLimitThreshold=<optimized out>, 
    springCoefficient=<optimized out>, 
    joint_effort_type=gtdynamics::Joint::Actuated, 
    sdf_joint=..., this=0x7fffffffd320)
    at ~/CS/Research/code/GTDynamics/gtdynamics/universal_robot/PrismaticJoint.h:66
#13 gtdynamics::PrismaticJoint::PrismaticJoint (
    child_link=std::shared_ptr<gtdynamics::Link> (empty) = {...}, 
    parent_link=std::shared_ptr<gtdynamics::Link> (empty) = {...}, parameters=..., sdf_joint=..., 
    this=0x7fffffffd320)
    at ~/CS/Research/code/GTDynamics/gtdynamics/universal_robot/PrismaticJoint.h:84
#14 gtdynamics::extractRobotFromSdf[abi:cxx11](sdf::v8::Model, boost::optional<std::vector<gtdynamics::JointParams, std::allocator<gtdynamics::JointParams> > >) (sdf=..., joint_params=...)
    at ~/CS/Research/code/GTDynamics/gtdynamics/universal_robot/Robot.cpp:10---Type <return> to continue, or q <return> to quit---
1
#15 0x00007ffff7b91c55 in gtdynamics::extractRobotFromFile (file_path="../../urdfs/fetch.urdf", 
    model_name="", joint_params=...)
    at ~/CS/Research/code/GTDynamics/gtdynamics/universal_robot/Robot.cpp:138
#16 0x00007ffff7b91f87 in gtdynamics::Robot::Robot (
    this=0x7fffffffd850, file_path=..., 
    model_name=...)
    at ~/CS/Research/code/GTDynamics/gtdynamics/universal_robot/Robot.cpp:150
#17 0x0000555555555e36 in main (
    argc=<optimized out>, argv=<optimized out>)
    at ~/CS/Research/code/GTDynamics/scripts/mandy00_talos_dynamics_timing.cpp:23
@varunagrawal
Copy link
Collaborator

This could be because of a malformed URDF file, or it may have some external dependencies (like texture meshes).

@varunagrawal
Copy link
Collaborator

It is because the URDF file relies on external STL meshes and the sdformat parser can't deal with it.

@varunagrawal
Copy link
Collaborator

@gchenfc I am updating the fetch.urdf model. It is interesting to note however that the loading segfaults because sdformat8 fails to read in all the links (it is not reading in the r_gripper_link).

Sdformat9 does not have this issue, so this issue will be fixed once #48 is merged in.

@varunagrawal varunagrawal linked a pull request Mar 22, 2021 that will close this issue
@dellaert
Copy link
Member

I know I have to be in python directory when executing python tests, otherwise segfault. Might just be a crude "file not found"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants