jr-robotics / robo-gym-robot-servers

Repository containing Robot Servers ROS packages
https://sites.google.com/view/robo-gym
MIT License
29 stars 22 forks source link

Unable to start robogym with real UR5 #13

Closed KarimHP closed 1 year ago

KarimHP commented 1 year ago

So im trying to use robogym on Ubuntu 20.04 with ROS noetic installed.

I followed all steps in the tutorial. The only thing i did differently is that instead of installing the suggested UR-ROBOT_Driver from this guide i installed the official ones from the UR5 ROS Driver Website. The reason for that was that with the jr-robotics branch i got a rosdep error,

 Cannot locate rosdep definition for [ur_robot_driver]

when i tried it. But with the installation from the official UR5_ROS Driver (https://github.com/UniversalRobots/Universal_Robots_ROS_Driver) git its working fine as you can see in this screenshot: Screenshot from 2023-03-31 15-45-50

The Problem is now i want to start the last step in the tutorial and start it with:

roslaunch ur_robot_server ur_robot_server.launch ur_model:=ur5 real_robot:=true gui:=true max_torque_scale_factor:=0.5 max_velocity_scale_factor:=0.5 speed_scaling:=0.5

but i get this error:

roslaunch ur_robot_server ur_robot_server.launch ur_model:=ur5 real_robot:=true gui:=true max_torque_scale_factor:=0.5 max_velocity_scale_factor:=0.5 speed_scaling:=0.5
... logging to /home/moga/.ros/log/3c3ccc6e-cfc9-11ed-9e94-55afee765f77/roslaunch-mogaRoboGym-81286.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://mogaRoboGym:40069/

SUMMARY
========

PARAMETERS
 * /joint_trajectory_command_handler/action_cycle_rate: 25
 * /joint_trajectory_command_handler/real_robot: True
 * /n_objects: 0.0
 * /object_0_frame: 
 * /object_0_model_name: 
 * /object_1_frame: 
 * /object_1_model_name: 
 * /object_trajectory_file_name: no_file
 * /objects_controller: False
 * /real_robot: True
 * /reference_frame: base
 * /robot_server/action_cycle_rate: 25
 * /robot_server/action_mode: abs_pos
 * /robot_server/max_velocity_scale_factor: 0.5
 * /robot_server/real_robot: True
 * /robot_server/reference_frame: base
 * /robot_server/rs_mode: False
 * /robot_server/server_port: 50051
 * /robot_server/target_mode: only_robot
 * /robot_server/ur_model: ur5
 * /robot_server/use_voxel_occupancy: False
 * /rosdistro: noetic
 * /rosversion: 1.16.0

NODES
  /
    joint_trajectory_command_handler (ur_robot_server/joint_trajectory_command_handler.py)
    robot_server (ur_robot_server/robot_server.py)
    rviz_mogaRoboGym_81286_5040974041049025646 (rviz/rviz)

ROS_MASTER_URI=http://localhost:11311

process[joint_trajectory_command_handler-1]: started with pid [81315]
process[rviz_mogaRoboGym_81286_5040974041049025646-2]: started with pid [81316]
process[robot_server-3]: started with pid [81317]
[ INFO] [1680269939.611275386]: rviz version 1.14.19
[ INFO] [1680269939.611314149]: compiled against Qt version 5.12.8
[ INFO] [1680269939.611322084]: compiled against OGRE version 1.9.0 (Ghadamon)
[ INFO] [1680269939.618812407]: Forcing OpenGl version 0.
Traceback (most recent call last):
  File "/home/moga/robogym_ws/devel/lib/ur_robot_server/robot_server.py", line 15, in <module>
    exec(compile(fh.read(), python_script, 'exec'), context)
  File "/home/moga/robogym_ws/src/robo-gym-robot-servers/ur_robot_server/scripts/robot_server.py", line 5, in <module>
    from ur_robot_server.ros_bridge import UrRosBridge
  File "/home/moga/robogym_ws/src/robo-gym-robot-servers/ur_robot_server/src/ur_robot_server/ros_bridge.py", line 12, in <module>
    from robo_gym_server_modules.robot_server.grpc_msgs.python import robot_server_pb2
  File "/home/moga/.local/lib/python3.8/site-packages/robo_gym_server_modules/robot_server/grpc_msgs/python/robot_server_pb2.py", line 36, in <module>
    _descriptor.FieldDescriptor(
  File "/home/moga/.local/lib/python3.8/site-packages/google/protobuf/descriptor.py", line 561, in __new__
    _message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
 1. Downgrade the protobuf package to 3.20.x or lower.
 2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).

More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
[ INFO] [1680269939.774207778]: Stereo is NOT SUPPORTED
[ INFO] [1680269939.774252262]: OpenGL device: AMD YELLOW_CARP (DRM 3.42.0, 5.15.0-69-generic, LLVM 12.0.0)
[ INFO] [1680269939.774264856]: OpenGl version: 4,6 (GLSL 4,6) limited to GLSL 1.4 on Mesa system.
[robot_server-3] process has died [pid 81317, exit code 1, cmd /home/moga/robogym_ws/devel/lib/ur_robot_server/robot_server.py __name:=robot_server __log:=/home/moga/.ros/log/3c3ccc6e-cfc9-11ed-9e94-55afee765f77/robot_server-3.log].
log file: /home/moga/.ros/log/3c3ccc6e-cfc9-11ed-9e94-55afee765f77/robot_server-3*.log

Any idea what could be causing this? Here is a screenshot of what im seeing: Screenshot from 2023-03-31 15-48-40

Thank you in advance for every help. Im a bit stuck here :/

KarimHP commented 1 year ago

allright pip install protobuf==3.20.0 fixed it for me.

Alvin-shao commented 11 months ago

好吧,pip install protobuf==3.20.0 为我修复了它。

May I ask which version of Python and Gym you are using? I have been unable to call the reset function while using robogym. I would like to refer to your successful ones.