Table of Contents
RPC (Remote Procedure Call) feature for higher level of robot operations for the Hironx-variant robots (i.e. Hironx, NEXTAGE Open).
Having the following software installed is assumed.
The rest of this document discusses the Ubuntu environment only unless specified.
The following command should install all necessary packages.
sudo apt-get install ros-indigo-hironx-rpc
Although in the following example your Catkin workspace named is assumed to be named as cws_rpc, you can change it as you wish, or use your own existing one as needed:
sudo apt-get install python-catkin-tools python-rosdep python-wstool
mkdir -p ~/cws_rpc/src && cd ~/cws_rpc
wstool init src
wstool merge -t src https://raw.githubusercontent.com/tork-a/hironx_rpc/master/.rosinstall
wstool update -t src
rosdep install -r -y --from-paths src --ignore-src
catkin build
source devel/setup.bash
You simply need to (0) run RTM-ROS bridge (1) run RPC server, and you’re ready to (2) execute your commands.
hironx_rpc_server is based on ROS Service, so RTM-ROS bridge needs to be running on your Ubuntu computer. As documented in the tutorial also, do the following.
Note that running ROS-RTM bridge isn’t RPC specific; you need them to be running when you want to program in ROS for these robots.
roslaunch hironx_ros_bridge hironx_ros_bridge_real.launch nameserver:=%HOSTNAME% (Hironx)
roslaunch nextage_ros_bridge nextage_ros_bridge_real.launch nameserver:=%HOSTNAME% (NEXTAGE OPEN. nextage is the most commonly used value)
Run hrpsys-simulator:
rtmlaunch hironx_ros_bridge hironx_ros_bridge_simulation.launch (Hironx)
rtmlaunch nextage_ros_bridge nextage_ros_bridge_simulation.launch (NEXTAGE Open)
Run RPC server that starts ROS nodes for RPC:
roslaunch hironx_rpc_server rpc.launch (Real robot)
roslaunch hironx_rpc_server rpc_sim.launch (Simulation)
By default this assumes your robot’s hostname is hiro. You can change by passing an argument as follows. If you’re not sure what this is about, see this tutorial again:
roslaunch hironx_rpc_server rpc.launch CORBA_NAMESERVER_NAME:=nextage (Many NEXTAGE users use `nextage` as the robot's hostname)
RPC invocations defined in this package are normal ROS Service (+ some Actions). So call them by the ROS Service manner.
To see the list of all RPCs, see hironx_rpc_server/sample_rpc.py. All methods in that Python file that start with sample_ are the example of how you can call RPCs defined.
You can use the sample methods on ipython terminal, which can be run as:
ipython -i `rospack find hironx_rpc_server`/script/sample_rpc_script.py
Then call the methods through sample_rpc object. For example:
In [1]: sample_rpc.sample_goInitial()
Search existing issues, submit a ticket at the repository.
RPC layer is what’s defined in this package hironx_rpc.
Some existing ROS topics and services are utilized from hrpsys_ros_bridge package, but still majority of underlining Topics/Services are created (and stored in hironx_rpc_msgs).
The work initially taken to create this package was sponsored by Yamaguchi Lab at Keio University.