-
Notifications
You must be signed in to change notification settings - Fork 486
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support plotting for entities with / in the name (#3187)
I noticed while testing the rexrov models from the rexrov model in Field-Robotics-Lab/dave that the plotting window does not work properly when elements of a model include a forward-slash `/` in the entity name. To fix the problem, the `/` characters are encoded as %2f in physics::Base::URI(). Corresponding decoding is added to the gui/plot/Palette class. * Escape '%' as "%25" as well This would prevent a string containing "%2f" from incorrectly being unescaped to "/". Signed-off-by: Steve Peters <scpeters@openrobotics.org>
- Loading branch information
Showing
5 changed files
with
172 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
<?xml version="1.0" ?> | ||
<sdf version="1.4"> | ||
<world name="default"> | ||
<physics type="ode"> | ||
<gravity>1 0 -9.81</gravity> | ||
<max_step_size>0.00101</max_step_size> | ||
</physics> | ||
<include> | ||
<uri>model://sun</uri> | ||
</include> | ||
<!-- add %2f to ensure it is escaped properly --> | ||
<model name="double/pendulum_%2f"> | ||
<pose>0 0 0.9 0.7853981633974483 0 0</pose> | ||
<link name="upper/link"> | ||
<pose>0 0 -0.05 0 0 0</pose> | ||
<inertial> | ||
<mass>0.02700000000000001</mass> | ||
<inertia> | ||
<ixx>2.272500000000001e-05</ixx> | ||
<iyy>2.272500000000001e-05</iyy> | ||
<izz>4.5000000000000035e-07</izz> | ||
<ixy>0.0</ixy> | ||
<ixz>0.0</ixz> | ||
<iyz>0.0</iyz> | ||
</inertia> | ||
</inertial> | ||
<collision name="collision"> | ||
<geometry> | ||
<box> | ||
<size>0.010000000000000002 0.010000000000000002 0.1</size> | ||
</box> | ||
</geometry> | ||
</collision> | ||
<visual name="visual"> | ||
<geometry> | ||
<box> | ||
<size>0.010000000000000002 0.010000000000000002 0.1</size> | ||
</box> | ||
</geometry> | ||
</visual> | ||
</link> | ||
<joint name="upper/joint" type="revolute"> | ||
<pose>0 0 0.05 0 0 0</pose> | ||
<parent>world</parent> | ||
<child>upper/link</child> | ||
<axis> | ||
<xyz>1 0 0</xyz> | ||
</axis> | ||
</joint> | ||
<link name="lower/link"> | ||
<pose>0 0.17677669529663687 -0.2767766952966369 0.7853981633974483 0 0</pose> | ||
<inertial> | ||
<mass>3.375</mass> | ||
<inertia> | ||
<ixx>0.071015625</ixx> | ||
<iyy>0.071015625</iyy> | ||
<izz>0.0014062500000000004</izz> | ||
<ixy>0.0</ixy> | ||
<ixz>0.0</ixz> | ||
<iyz>0.0</iyz> | ||
</inertia> | ||
</inertial> | ||
<collision name="collision"> | ||
<geometry> | ||
<box> | ||
<size>0.05 0.05 0.5</size> | ||
</box> | ||
</geometry> | ||
</collision> | ||
<visual name="visual"> | ||
<geometry> | ||
<box> | ||
<size>0.05 0.05 0.5</size> | ||
</box> | ||
</geometry> | ||
</visual> | ||
</link> | ||
<joint name="lower/joint" type="revolute"> | ||
<pose>0 0 0.25 0 0 0</pose> | ||
<parent>upper/link</parent> | ||
<child>lower/link</child> | ||
<axis> | ||
<xyz>1 0 0</xyz> | ||
</axis> | ||
</joint> | ||
</model> | ||
</world> | ||
</sdf> |