Skip to content

mcsix/xela-server-ros

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XELA Sensor Server ROS module package

Attention:

This package is now considered as outdated and might not receive any further updates.

ROS 1

For the latest ROS 1 package, please use ROS Node for XELA Sensors (ROS 1).

Note: The code will be incompatible with this package and will require a full rewrite of the code that uses it.

ROS 2

For the latest ROS 2 package, please use ROS Node for XELA Sensors (ROS 2).

Note: This code will be incompatible with any ROS 1 package and has the same naming as the ROS 1 package mentioned above.


Disclaimer

This package is released As Is and under GNU GPL v3 license.

Purpose

This package is used to convert XELA Server packets into ROS Service messages.

Note this package acts as a middle-ware for the main XELA Server software. Please see xela.lat-d5.com for download information

Warnings

ROS has limits on how many messages it is able to send per second, which can be a lot less than what the server app does. Therefore this app has to dump excess messages by overwriting the buffer. There are several residual parts from initial closed source module with confidential parts stripped out.

Requirements

Python 2.7 (not recommended) or Python 3.4+ websocket-client package

Use

Installation

Copy the xela_server directory into your catkin workspace src directory and build as usual.
Install the regular XELA Server software on PATH to use the launch file

Run

Either run the launch file roslaunch xela_server service.launch or activate everything separately roscore, xela_server and rosrun xela_server xela_service

Note For the launch file, the xela_server app must be in the PATH variable or you would need to replace the xela_server app inside the scripts directory with the one from the main app suite

Services

Service call Explanation Example output
rosservice call /xServXY 1 2 Get X and Y for Taxel 2 on Sensor 1 values: [32572, 31596]
rosservice call /xServXYZ 1 2 Get X, Y and Z for Taxel 2 on Sensor 1 values: [32572, 31596, 35901]
rosservice call /xServX 1 2 Get X for Taxel 2 on Sensor 1 value: 32572
rosservice call /xServY 1 2 Get Y for Taxel 2 on Sensor 1 value: 31596
rosservice call /xServZ 1 2 Get Z for Taxel 2 on Sensor 1 value: 35901
rosservice call /xServStream 1 Get Full data from Sensor 1 xyz: [1: [32457, 32553, 32057], 2: [32572, 31596, 35901]… ]

Topics

Topic name Topic message type Description
/xServTopic xela_server/XStream Get all sensors and taxels as a constant stream

ROS Launch arguments

Argument Description
noserver:=1 Will not run xela_server (requires external launch of the app on same or different computer)
port:=5000 Define xela_server port, default is 5000
ip:=127.0.0.1 Define xela_server IP, default is 127.0.0.1
file:=/etc/xela/xServ.ini Define configuration file for xela_server, default is /etc/xela/xServ.ini
d:=0 Define debug level, default 0, max 3. Prints info based on service requests made via ROS
1 - Request type only
2 - Request type and sensor/taxel info
3 - Request type, sensor/taxel info and returned values

Example code for ROS

File: example.py

#!/usr/bin/env python

import rospy from xela_server.srv
import XelaSensorXYZ
import sys

rospy.init_node('use_service') 

# wait the service to be advertised, otherwise the service use will fail 
rospy.wait_for_service('xServXYZ') 

# setup a local proxy for the service (we will ask for X,Y and Z data) 
srv=rospy.ServiceProxy('xServXYZ', XelaSensorXYZ) 

# use the service and send it a value. 
# In this case, I am sending sensor: 1 and taxel: 3 
service_example=srv(1, 3) 

# print the result from the service 
print(service_example) 

# close the app 
sys.exit(0)

In case of newer ROS like Noetic, you might need to change the shebang line to support python3

About

ROS module for XELA Sensor Server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published