yaml parameters to node args
hi all,
In a roslaunch file I instanciate nodes which use yaml's data. I have 3D points where I want to spawn urdf models
Here an example for 1 node / 3D point.
example.yaml :
E1_position_X: 30.03
E1_position_Y: 32.93
E1_position_Z: 10.10
example.launch :
<param name="robot_description" command="$(find xacro)/xacro --inorder $(find simulation)/urdf/robot.urdf.xacro"/>
<node name="spawn_urdf_car_E1" pkg="gazebo_ros" type="spawn_model"
args= "-param robot_description
-urdf
-model $(arg immat)
-x ? (Should be E1_position_X)
-y ? (Should be E1_position_Y)
-z ? (Should be E1_position_Z)
output="screen"/>
I don't know how to use yaml's data in this case. If someone has an idea :) Thanks
RosKinetic / Gazebo7
Similar question from a while ago http://answers.ros.org/question/11522... - a similar answer for you would be to use launch files instead of yamls for parameters like this, which may not be satisfactory.
$(eval rospy.get_param('/E1_position_X'))
doesn't work...$(eval compile('''import rospy; rospy.get_param('/testx')''', 'abc', 'single'))
doesn't fail, but the value is the code of compile() (e.g.<code object <module> at 0x762d99f8, file "abc", line 1>
), not the executed compiled code output.I didn't suceed with this method so I wrote a short Python script who teleports models at the good coordonates in yaml file. Thanks for your time :)