Closed bheijden closed 3 years ago
Op mijn computer werkt dynamic_example.py
wel maar bij example.py
krijg ik de onderstaande error. Werkt example.py bij jou wel? Iets met list index out of range en de load_yaml
function. Wil weten of dit alleenop mijn computer een probleem is.
process[ros_env/physics_bridge-1]: started with pid [10148]
... logging to /home/bas/.ros/log/0d3bc984-b8af-11eb-9be2-ac675d3b5380/roslaunch-bas-Alienware-m15-R2-10148.log
started roslaunch server http://192.168.68.113:36329/
SUMMARY
========
PARAMETERS
* /rosdistro: melodic
* /rosversion: 1.14.10
NODES
/ros_env/
webots (webots_ros/webots_launcher.py)
ROS_MASTER_URI=http://localhost:11311
process[ros_env/webots-1]: started with pid [10169]
[ERROR] [1621435068.880005]: Error processing request: list index out of range
['Traceback (most recent call last):\n', ' File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py", line 632, in _handle_request\n response = convert_return_to_response(self.handler(request), self.response_class)\n', ' File "/home/bas/ros_gym_ws/src/ros-gym/ros_gym_core/src/ros_gym_core/physics_bridge.py", line 37, in __register_handler\n params = load_yaml(object_type[0], object_type[1])\n', 'IndexError: list index out of range\n']
Traceback (most recent call last):
File "/home/bas/ros_gym_ws/src/ros-gym/examples/ur5e_example/scripts/example.py", line 26, in <module>
env = Flatten(RosEnv(robots=[UR5e("ur5e1")], name='ros_env', engine_params=wb_params))
File "/home/bas/ros_gym_ws/src/ros-gym/ros_gym_core/src/ros_gym_core/ros_env.py", line 96, in __init__
self._init_nodes(self.robots, self.sensors, self.observers)
File "/home/bas/ros_gym_ws/src/ros-gym/ros_gym_core/src/ros_gym_core/ros_env.py", line 25, in _init_nodes
self._register_objects(robots, sensors, observers)
File "/home/bas/ros_gym_ws/src/ros-gym/ros_gym_core/src/ros_gym_core/ros_env.py", line 37, in _register_objects
register_service(objects)
File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py", line 442, in __call__
return self.call(*args, **kwds)
File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py", line 522, in call
responses = transport.receive_once()
File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/impl/tcpros_base.py", line 735, in receive_once
p.read_messages(b, msg_queue, sock)
File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py", line 360, in read_messages
self._read_ok_byte(b, sock)
File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py", line 343, in _read_ok_byte
raise ServiceException("service [%s] responded with an error: %s"%(self.resolved_name, str))
rospy.service.ServiceException: service [/ros_env/register] responded with an error: b'error processing request: list index out of range'
[ros_env/physics_bridge-1] killing on exit
[ros_env/webots-1] killing on exit
Traceback (most recent call last):
File "/opt/ros/melodic/lib/webots_ros/webots_launcher.py", line 40, in <module>
subprocess.call(command)
File "/usr/lib/python2.7/subprocess.py", line 172, in call
return Popen(*popenargs, **kwargs).wait()
File "/usr/lib/python2.7/subprocess.py", line 1099, in wait
pid, sts = _eintr_retry_call(os.waitpid, self.pid, 0)
File "/usr/lib/python2.7/subprocess.py", line 125, in _eintr_retry_call
return func(*args)
KeyboardInterrupt
[ur5e_example-1] process has died [pid 10122, exit code 1, cmd /home/bas/ros_gym_ws/src/ros-gym/examples/ur5e_example/scripts/example.py __name:=ur5e_example __log:=/home/bas/.ros/log/0d3bc984-b8af-11eb-9be2-ac675d3b5380/ur5e_example-1.log].
log file: /home/bas/.ros/log/0d3bc984-b8af-11eb-9be2-ac675d3b5380/ur5e_example-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete
done````
Ah, dat heeft wss te maken met mijn veranderingen (example.py gebuirkt nog de UR5e class uit de aparte package). Ik zal er wel effe naar kijken. PR is goed!
Also removed the default argument in
pybullet.launch
enwebots.launch
as we must force people to specify a name in RosEnv that is consistent with the namespace in the physics_bridge launch files. In this way, the argument can only come from RosEnv.