Forum Replies Created
-
AuthorPosts
-
mikelituBlocked
Hi @Hugo
I ultimately solved the problem and now the scene is properly working. I managed to use a Vec3D template to map a point inside the Haptic device the model and use that point to apply the constraints. Thank you very much.
Best,
Mikel
mikelituBlockedmikelituBlockedHi all,
I have solved all the problems regarding the topics discussed here, I have opened a new topic to discuss the Sliding Constraint problem due to the template mismatch between the points and the Haptic device mechanical object.
Best,
MikelmikelituBlockedHi,
I am trying to use the SlidingConstraint with the Mechanical Object corresponding to the Haptic device. Has someone managed to implement this successfully, the idea is to limit the movement of the device around a certain predefined direction. By now I have made a simple scene in which I am trying to implement this effect. When I animate the scene the device starts moving randomly in every direction and do not know why. I will paste the code here for you to have a look.
<Node name="lroot" gravity="0 0 0" dt="0.01"> <RequiredPlugin name="SofaOpenglVisual"/> <RequiredPlugin name="SofaHAPI" /> <RequiredPlugin name="SofaMiscCollision" /> <RequiredPlugin name="SofaHaptics" /> <FreeMotionAnimationLoop /> <GenericConstraintSolver maxIterations="1000" tolerance="0.005"/> <DefaultPipeline depth="8" /> <BruteForceDetection name="N2" /> <LocalMinDistance name="Proximity" alarmDistance="0.1" contactDistance="0.05" /> <!-- <DefaultContactManager name="Response" response="FrictionContact"/>--> <RuleBasedContactManager name="Response" response="FrictionContact" rules="1 * FrictionContact?mu=0.01 " /> <DefaultVisualManagerLoop /> <Node name="SlidingPoint"> <MechanicalObject name="points" template="Vec3d" position="1 1.25 -0.2 1 1.25 0.2" free_position="1 1.25 -0.2 1 1.25 0.2" /> </Node> <Node name="NovintObject"> <Node name="RigidLayer"> <MechanicalObject name="ToolRealPosition" template="Rigid3d" position="0 0 0 1 0 0 0"/> <SofaHAPIHapticsDevice name="NovintDriver1" scale="300" drawDevice="0" permanent="1" printLog="true" handleEventTriggersUpdate="true" positionBase="0 5 0" orientationBase="1 0 0 0" positionTool="0 0 0" orientationTool="1 0 0 0"/> <Node name="Tool1"> <MechanicalObject template="Rigid3d" name="RealPosition"/> <SubsetMapping indices="0"/> </Node> </Node> </Node> <Node name="Tool1"> <EulerImplicitSolver rayleighStiffness="0.1" rayleighMass="0.1" /> <CGLinearSolver /> <MechanicalObject name="ms" template="Rigid3d" position="0 0 0 1 0 0 0"/> <UniformMass totalMass="0.1" /> <LCPForceFeedback activate="true" forceCoef="0.005" /> <Node name="Collision"> <MeshObjLoader name="Surf" filename="mesh/sphere.obj" /> <MeshTopology src="@Surf" /> <MechanicalObject src="@Surf" scale="0.05"/> <TriangleCollisionModel bothSide="false" group="1" color="0 0 1 1" /> <LineCollisionModel bothSide="false" group="1" /> <RigidMapping /> </Node> <Node name="Visual"> <MeshObjLoader name="InputMesh" filename="mesh/sphere.obj" scale="0.05"/> <MeshTopology src="@InputMesh" /> <OglModel name="VisualModel" color="blue"/> <RigidMapping /> </Node> <!-- <RestShapeSpringsForceField template="Rigid3d" stiffness="1000000" angularStiffness="200000000" external_rest_shape="@../NovintObject/RigidLayer/Tool1/RealPosition" /> --> <UncoupledConstraintCorrection /> <Node name="Constraints"> <MechanicalObject name="points" template="Rigid3d" position="1 1.25 1 1 0 0 0 1 1.25 -1 1 0 0 0 0 0 0 1 0 0 0" /> <RigidMapping /> </Node> <SlidingConstraint name="constraint1" object1="@SlidingPoint/points" object2="@Tool1/Constraints/points" sliding_point="0" axis_1="0" axis_2="1" /> </Node> <Node name="Line"> <MechanicalObject name="points" template="Vec3d" position="6 1.25 1 6 1.25 -1" free_position="6 1.25 1 6 1.25 -1" /> </Node> </Node>
Best,
MikelmikelituBlockedHi @epernod,
The Falcon Device are available on this link https://hapticshouse.com/collections/falcons/products/black-falcon-3d-touch-haptic-controller. I think they are still the same as the old ones.
I will have a look to those part of the xml scene. I think the scene was coded for an Omni device, but I can use my Falcon Device there. I will have a look of how to define the positions of the base and the tool. Thanks for your help and I will post here further updates.
Best,
MikelmikelituBlockedHi @Hugo,
I am having some issues when compiling SOFA v20.06 with the Eigen3 directory. I have download their zip file and extract it into the C:/ folder. Do I need to make something else once I download the Eigen folder from their page? Not sure if I am defining the variables EIGEN3_INCLUDE_DIR to C:/eigen-3.2.10. Thanks for your help.
Best,
MikelmikelituBlockedIt is indeed a new Novint Falcon, it is still on sale on their webpage. I have some data refering to the origin of the tool at the start, however when I try to change this value the robot starts with a weird behaviour. This is the code for the scene, it is very similar to the SofaHAPI example 2, but changing the spheres for the liver model from SOFA.
<?xml version="1.0" ?> <Node name="lroot" gravity="0 0 0" dt="0.02"> <RequiredPlugin name="SofaOpenglVisual"/> <RequiredPlugin name="SofaHAPI" /> <RequiredPlugin name="SofaMiscCollision" /> <RequiredPlugin name="SofaHaptics" /> <FreeMotionAnimationLoop /> <GenericConstraintSolver maxIterations="1000" tolerance="0.005"/> <DefaultPipeline depth="8" /> <BruteForceDetection name="N2" /> <LocalMinDistance name="Proximity" alarmDistance="0.4" contactDistance="0.2" /> <!-- <DefaultContactManager name="Response" response="FrictionContact"/>--> <RuleBasedContactManager name="Response" response="FrictionContact" rules="1 * FrictionContact?mu=0.01 " /> <DefaultVisualManagerLoop /> <Node name="NovintObject"> <Node name="RigidLayer"> <MechanicalObject name="ToolRealPosition" template="Rigid3d" position="4 0 12 0 0 0 1"/> <SofaHAPIHapticsDevice name="NovintDriver1" scale="50" drawDevice="0" permanent="1" printLog="true" handleEventTriggersUpdate="true" positionBase="0 5 0" orientationBase="0 0 0 1" positionTool="0 0 0" orientationTool="0 0 0 1"/> <Node name="Tool1"> <MechanicalObject template="Rigid3d" name="RealPosition"/> <SubsetMapping indices="0"/> </Node> </Node> </Node> <Node name="Tool1"> <EulerImplicitSolver rayleighStiffness="0.1" rayleighMass="0.1" /> <CGLinearSolver /> <MechanicalObject name="ms" template="Rigid3d" position="-7.13718 5.81916 23.8066 0 0 0 1"/> <UniformMass totalMass="0.1" /> <LCPForceFeedback activate="true" forceCoef="0.005" /> <Node name="Collision"> <!-- <Mesh filename="assets/meshes/crescentBlade_CM.obj" /> --> <MeshTopology position="0 0 0 0 0 10" lines="0 1" /> <!-- <SphereGridTopology radius="0.1"/> --> <MechanicalObject name="CM" /> <TriangleCollisionModel bothSide="false" group="1" color="0 0 1 1" /> <SphereCollisionModel group="1"/> <LineCollisionModel bothSide="false" group="1" /> <RigidMapping /> </Node> <!-- <Node name="Visual"> <MeshObjLoader name="InputMesh" filename="mesh/sphere_05.obj" scale="0.025" /> <MeshTopology src="@InputMesh" /> <OglModel name="VisualModel" color="blue"/> <RigidMapping /> </Node> --> <RestShapeSpringsForceField template="Rigid3d" stiffness="1000000" angularStiffness="200000000" external_rest_shape="@../NovintObject/RigidLayer/Tool1/RealPosition" /> <UncoupledConstraintCorrection compliance="0.001 0.00003 0 0 0.00003 0 0.00003" /> </Node> <MeshObjLoader name="LiverSurface" filename="mesh/liver-smooth.obj" /> <Node name="Liver" gravity="0 0 0"> <EulerImplicitSolver name="cg_odesolver" rayleighStiffness="0.1" rayleighMass="0.1" /> <CGLinearSolver name="linear solver" iterations="25" tolerance="1e-09" threshold="1e-09" /> <MeshGmshLoader name="meshLoader" filename="mesh/liver.msh" /> <TetrahedronSetTopologyContainer name="topo" src="@meshLoader" /> <MechanicalObject name="dofs" src="@meshLoader" scale="4" /> <TetrahedronSetGeometryAlgorithms template="Vec3d" name="GeomAlgo" /> <DiagonalMass name="computed using mass density" massDensity="1" /> <TetrahedralCorotationalFEMForceField template="Vec3d" name="FEM" method="large" poissonRatio="0.3" youngModulus="3000" computeGlobalMatrix="0" /> <FixedConstraint name="FixedConstraint" indices="3 39 64" /> <UncoupledConstraintCorrection compliance="0.005" /> <Node name="Visu" tags="Visual" gravity="0 0 0"> <OglModel name="VisualModel" src="@../../LiverSurface" scale="4" /> <BarycentricMapping name="visual mapping" input="@../dofs" output="@VisualModel" /> </Node> <Node name="Surf" gravity="0 0 0"> <MeshGmshLoader name= "loader" filename="mesh/liver.msh" /> <MeshTopology src="@loader" /> <MechanicalObject src="@loader" scale="4" /> <TriangleCollisionModel selfCollision="0" /> <LineCollisionModel selfCollision="0" /> <PointCollisionModel selfCollision="0" /> <BarycentricMapping /> </Node> </Node> </Node>
Best,
MikelmikelituBlockedHello Hugo,
Thank you for your answer I will try this fuction and will adapt it to my case.
Best,
MikelmikelituBlockedHello everyone,
I have managed to put the haptic device working after some changes in the parameters of the solver. However, the Novint Falcon has a very limited workspace and when I try to implement a more complex scene I can not move the robot far from its original position. I have tried to change the parameters of the mechanical object where the HAPIDevice is defined, but I do not observe any big difference. In addition the Novin Falcon has only 3DoF and I do not know if I can change the Rigid3d template to Vec3d, I have tried this but I have some mapping issues and the device is not linked with the Mechanical Object for the tool. I have defined the tool as a SphereTopologyContainer will this be affecting the workspace of the robot. I need some help. Thank you for your attention.
Mikel
mikelituBlockedHello,
Even if I still have the same error loading the plugin I can use the Novint Falcon into the example scene contained in the examples for the SofaHAPI plugin. However, after a few seconds SOFA displays an error message for runtime error and closes:
Microsoft Visual C++ Runtime Library. Runtime error! abnormal program termination
Anyone knows how to solve this issue? Or how to load the SofaHAPI plugin correctly without any error?
Thank everyone
-
AuthorPosts