Home › Forum › SOFA › Using SOFA › Change default pose of scene
Tagged: Scene; XML; Pose
- This topic has 5 replies, 2 voices, and was last updated 5 years, 5 months ago by Hugo.
-
AuthorPosts
-
8 June 2019 at 23:12 #13611LekanBlocked
Hi guys,
In ROS, we can control the default world pose of a scene in the URDF file.
Is there a way to do this in SOFA?
11 June 2019 at 18:58 #13626HugoKeymasterHi @lakehanne
I am glad to see that you are already using the ROS plugin from Dr. Aichele, Olalekan! Congrats.
Are you talking about changing the point of view in the scene?
Hugo
11 June 2019 at 19:38 #13631LekanBlockedHello @Hugo,
I have not started using the ROS Plugin yet as it is my understanding that it is not public yet.
I am asking for a default world pose for the scene at initialization of the scene, yes.
Is there a way you do this? IN URDF/XML/Xacro files, we’d do something like
<pose>0 0 0 0 0 0</pose>
More so, we can define a global property in Xacro such as
<property name="cal_caster_fl" value="0.0" />
that can be used as a variable in multiple locations in an xml file. DoesSOFA
have this property?12 June 2019 at 09:54 #13636HugoKeymasterHi @lakehanne
In the SOFA GUI, you have a button “Save View” allowing you to save the current camera position. This actually generates a file (*.scn.view) storing these information (position and orientation).
If you are in python, an alternative is to use an
<InteractiveCamera />
. You can find the API of InteractiveCamera here.Let me know if it helps.
Hugo
13 June 2019 at 03:29 #13645LekanBlockedAye, Aye!
Thank you, @Hugo! That was really cool to know.
Now back unto my question that you earlier skipped and a +1:
1.
-
is there a feature such as in ROS e.g. <property name=”cal_caster_fl” value=”0.0″ /> that can be used as a variable to be later referred to in multiple locations in an xml file?
2.
-
In my terminal, after launching a scene, I keep getting warnings like
[WARNING] [MeshTopology(meshTopology)] Unused Attribute: “dx” with value: “95”
because I used the
dx
attribute to describe an object’s position in a scene file I am including in my main scene file. Why does SOFA spill this to terminal everytime I include the scene file? Would ‘preciate your help, bro.19 June 2019 at 18:36 #13786HugoKeymasterHi @lakehanne
1. I am not familiar with ROS and not sure of what you need. As I understand it, something would solve your question: either use python in which you can have global variable in your script or in xml, you can use *.pscn files (e.g. see /data/Softwares/sofa/src/master/examples/Benchmark/Performance/Bar16-fem-implicit-Vec3f.pscn or any other pscn scene.
2. your warning comes from the fact that the component MeshTopology has no data named “dx”. This input is therefore just not taken into account.
Does this answer your questions?
BestHugo
-
AuthorPosts
- You must be logged in to reply to this topic.