Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Stack Of Tasks
sot-talos
Commits
7391adda
Commit
7391adda
authored
Jun 23, 2020
by
Olivier Stasse
Browse files
Remove reading /robot_description through rospy.
Uses parameter-server instead.
parent
bf5e7afc
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/dynamic_graph/sot/talos/talos.py
View file @
7391adda
...
@@ -10,6 +10,7 @@ from dynamic_graph.sot.core.math_small_entities import Derivator_of_Vector
...
@@ -10,6 +10,7 @@ from dynamic_graph.sot.core.math_small_entities import Derivator_of_Vector
from
dynamic_graph.sot.dynamic_pinocchio
import
DynamicPinocchio
from
dynamic_graph.sot.dynamic_pinocchio
import
DynamicPinocchio
from
dynamic_graph.sot.dynamic_pinocchio.humanoid_robot
import
\
from
dynamic_graph.sot.dynamic_pinocchio.humanoid_robot
import
\
AbstractHumanoidRobot
AbstractHumanoidRobot
from
dynamic_graph.sot.core.parameter_server
import
ParameterServer
from
rospkg
import
RosPack
from
rospkg
import
RosPack
...
@@ -67,12 +68,15 @@ class Talos(AbstractHumanoidRobot):
...
@@ -67,12 +68,15 @@ class Talos(AbstractHumanoidRobot):
if
fromRosParam
:
if
fromRosParam
:
print
(
"Using ROS parameter
\"
/robot_description
\"
"
)
print
(
"Using ROS parameter
\"
/robot_description
\"
"
)
rosParamName
=
"/robot_description"
rosParamName
=
"/robot_description"
import
rospy
self
.
param_server
=
ParameterServer
(
"param_server"
)
if
rosParamName
not
in
rospy
.
get_param_names
():
self
.
param_server
.
init_simple
()
raise
RuntimeError
(
'"'
+
rosParamName
+
'" is not a ROS parameter.'
)
model2_string
=
self
.
param_server
.
getParameter
(
rosParamName
)
s
=
rospy
.
get_param
(
rosParamName
)
print
(
"Start model2_string"
)
print
(
model2_string
)
self
.
loadModelFromString
(
s
,
rootJointType
=
pinocchio
.
JointModelFreeFlyer
,
removeMimicJoints
=
True
)
print
(
"Stop model2_string"
)
self
.
loadModelFromString
(
model2_string
,
rootJointType
=
pinocchio
.
JointModelFreeFlyer
,
removeMimicJoints
=
True
)
else
:
else
:
self
.
loadModelFromUrdf
(
self
.
defaultFilename
,
self
.
loadModelFromUrdf
(
self
.
defaultFilename
,
rootJointType
=
pinocchio
.
JointModelFreeFlyer
,
rootJointType
=
pinocchio
.
JointModelFreeFlyer
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment