Giter Site home page Giter Site logo

jr-robotics / robo-gym-server-modules Goto Github PK

View Code? Open in Web Editor NEW
5.0 8.0 10.0 50 KB

Robot Servers and Server Manager software for robo-gym

Home Page: https://sites.google.com/view/robo-gym

License: MIT License

Shell 3.57% Python 96.43%
robo-gym openai-gym robotics

robo-gym-server-modules's Introduction

robo-gym-server-modules

Robot Servers and Server Manager software for robo-gym.

For info on how to use this package please visit the robo-gym website or the main robo-gym repository.

Install

pip install robo-gym-server-modules

Server Manager

How to use

The commands to control the Server Manager are:

  • start-server-manager starts the Server Manager in the background
  • attach-to-server-manager attaches the console to the Server Manager tmux session allowing to visualize the status of the Server Manager
  • Ctrl+B, D detaches the console from the Server Manager tmux session
  • kill-all-robot-servers kills all the running Robot Servers and the Server Manager
  • kill-server-manager kills the Server Manager
  • restart-server-manager kills all the running Robot Servers and the Server Manager and starts the Server Manager in the background

Testing

Start the Server Manager and attach to the session with:

start-server-manager && attach-to-server-manager

Expected output:

2021-XX-XX XX:XX:XX,XXX - serverManager - INFO - Server Manager started at 50100

If you get: start-server-manager: command not found it is most probably because your $PATH is not set correctly, to fix the problem add:

export PATH="/home/<your_username>/.local/bin:$PATH"

to your .bashrc file.

Troubleshooting

The Server Manager starts the Robot Server/s in a tmux session. To access the session of the Robot Server, first connect to the tmux server with:

tmux -L ServerManager 

Then navigate to the session with Ctrl+b )

Tmux cheat sheet

Additional info

How to manually generate python code for the RobotServer

From the repository root folder:

 python -m grpc_tools.protoc -Irobo_gym_server_modules/robot_server/grpc_msgs/protos --python_out=robo_gym_server_modules/robot_server/grpc_msgs/python/. --grpc_python_out=robo_gym_server_modules/robot_server/grpc_msgs/python/. robo_gym_server_modules/robot_server/grpc_msgs/protos/robot_server.proto

robo-gym-server-modules's People

Contributors

friedemannzindler avatar mygoditsfull0fstars avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

robo-gym-server-modules's Issues

Error while running test python client

Hi!

While running the test MIR robot client program, I'm getting an error:
_InactiveRpcError of RPC that terminated with:
status = StatusCode.UNAVAILABLE
details = "failed to connect to all addresses"
debug_error_string = "{"created":"@1602461115.459864652","description":"Failed to pick subchannel","file":"src/core/ext/filters/client_channel/client_channel.cc","file_line":3941,"referenced_errors":[{"created":"@1602461115.459861937","description":"failed to connect to all addresses","file":"src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc","file_line":393,"grpc_status":14}]}"

On the client side, I get
Starting new Robot Server | Tentative 1
Starting new Robot Server | Tentative 2
Starting new Robot Server | Tentative 3
Starting new Robot Server | Tentative 4

Can you please help me out?
Thanks,
Kiran

On launch of robogym servers, pb2 error, TypeError: Descriptors cannot not be created directly.

Hi,

I am trying to use the robogym servers and am running into this issue on launch.

Details of my setup: Ubuntu 20, Ros Noetic, python 3.8.10

The command that I am running that results in the error:

roslaunch ur_robot_server ur_robot_server.launch ur_model:=ur10 gui:=true

The error:

Traceback (most recent call last):
File "/home/kirstyellis/robogym_ws/devel/lib/ur_robot_server/robot_server.py", line 15, in
exec(compile(fh.read(), python_script, 'exec'), context)
File "/home/kirstyellis/robogym_ws/src/robo-gym-robot-servers/ur_robot_server/scripts/robot_server.py", line 5, in
from ur_robot_server.ros_bridge import UrRosBridge
File "/home/kirstyellis/robogym_ws/src/robo-gym-robot-servers/ur_robot_server/src/ur_robot_server/ros_bridge.py", line 12, in
from robo_gym_server_modules.robot_server.grpc_msgs.python import robot_server_pb2
File "/home/kirstyellis/.local/lib/python3.8/site-packages/robo_gym_server_modules/robot_server/grpc_msgs/python/robot_server_pb2.py", line 36, in
_descriptor.FieldDescriptor(
File "/home/kirstyellis/.local/lib/python3.8/site-packages/google/protobuf/descriptor.py", line 560, 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).

Any ideas what is causing this? Has anyone else hit this issue?

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.