Open cadop opened 8 years ago
Additionally, This code:
import sys
import rospy
from youbot_pykdl import youbot_kinematics
def main():
rospy.init_node('youbot_kinematics')
print '*** Youbot PyKDL Kinematics ***\n'
kin = youbot_kinematics()
print '\n*** Youbot Description ***\n'
kin.print_robot_description()
print '\n*** Youbot KDL Chain ***\n'
kin.print_kdl_chain()
if __name__ == "__main__":
main()
Creates this error when roscore is running
youbot@ubuntu:~/Tiling/Ros_Tests$ python KDL_testing.py
*** Youbot PyKDL Kinematics ***
FROM PARAM SERVER
Traceback (most recent call last):
File "KDL_testing.py", line 17, in <module>
main()
File "KDL_testing.py", line 9, in main
kin = youbot_kinematics()
File "/usr/local/lib/python2.7/dist-packages/youbot_pykdl/youbot_pykdl.py", line 47, in __init__
self._youbot = URDF.from_parameter_server(key='robot_description')
File "/usr/local/lib/python2.7/dist-packages/urdf_parser_py/urdf.py", line 471, in from_parameter_server
return cls.from_xml_string(rospy.get_param(key))
File "/opt/ros/hydro/lib/python2.7/dist-packages/rospy/client.py", line 452, in get_param
return _param_server[param_name] #MasterProxy does all the magic for us
File "/opt/ros/hydro/lib/python2.7/dist-packages/rospy/msproxy.py", line 117, in __getitem__
raise KeyError(key)
KeyError: 'robot_description'
When running the example code, or even just executing the initialization without ros node, this error appears:
The code is
I have tried with roscore running and without it running, same error. I have also tried the if/else statement for the parameter, but that also does not work. What would be the problem?