robotwebtools / rosbridge_suite Goto Github PK
View Code? Open in Web Editor NEWServer Implementations of the rosbridge v2 Protocol
Home Page: https://robotwebtools.github.io
License: BSD 3-Clause "New" or "Revised" License
Server Implementations of the rosbridge v2 Protocol
Home Page: https://robotwebtools.github.io
License: BSD 3-Clause "New" or "Revised" License
rostest rosbridge_library test_internal.test
[rosbridge_library.rosunit-test_multi_publisher/test_unregister_multipublisher][FAILURE]
True is not false
File "/usr/lib/python2.7/unittest/case.py", line 327, in run
testMethod()
File "/home/jihoonl/research/ros/isolate/src/rosbridge_suite/rosbridge_library/test/internal/publishers/test_multi_publisher.py", line 42, in test_unregister_multipublisher
self.assertFalse(self.is_topic_published(topic))
File "/usr/lib/python2.7/unittest/case.py", line 414, in assertFalse
raise self.failureException(msg)
--------------------------------------------------------------------------------
[rosbridge_library.rosunit-test_publisher_manager/test_register_multiple_notopictype][FAILURE]
True is not false
File "/usr/lib/python2.7/unittest/case.py", line 327, in run
testMethod()
File "/home/jihoonl/research/ros/isolate/src/rosbridge_suite/rosbridge_library/test/internal/publishers/test_publisher_manager.py", line 152, in test_register_multiple_notopictype
self.assertFalse(self.is_topic_published(topic))
File "/usr/lib/python2.7/unittest/case.py", line 414, in assertFalse
raise self.failureException(msg)
--------------------------------------------------------------------------------
[rosbridge_library.rosunit-test_publisher_manager/test_register_multiple_publishers][FAILURE]
True is not false
File "/usr/lib/python2.7/unittest/case.py", line 327, in run
testMethod()
File "/home/jihoonl/research/ros/isolate/src/rosbridge_suite/rosbridge_library/test/internal/publishers/test_publisher_manager.py", line 97, in test_register_multiple_publishers
self.assertFalse(self.is_topic_published(topic1))
File "/usr/lib/python2.7/unittest/case.py", line 414, in assertFalse
raise self.failureException(msg)
--------------------------------------------------------------------------------
[rosbridge_library.rosunit-test_publisher_manager/test_register_no_msgtype][passed]
[rosbridge_library.rosunit-test_publisher_manager/test_register_publisher][FAILURE]
True is not false
File "/usr/lib/python2.7/unittest/case.py", line 327, in run
testMethod()
File "/home/jihoonl/research/ros/isolate/src/rosbridge_suite/rosbridge_library/test/internal/publishers/test_publisher_manager.py", line 37, in test_register_publisher
self.assertFalse(self.is_topic_published(topic))
File "/usr/lib/python2.7/unittest/case.py", line 414, in assertFalse
raise self.failureException(msg)
To hit hydro release cycle in July 29 2013.
Currently, the parameter to set the port must be at /rosbridge/port. It should be located inside the node's namespace to adhere to better standards (~port). This also allows the possibility of starting multiple rosbridge server nodes on the same machine.
Hello @baalexander @rctoris,
Seems like groovy-devel and hydro-devel are diverged now.
I think we should port changes in groovy-devel into hydro-devel.
What is the better way to merge these two branches? any suggestion?
The current rosbridge protocol supports no kind of authentication mechanism. I move enhance the protocol to support a new op
type called auth
. Authentication will be based on the MAC (message authentication code) scheme discussed at previous Robot Web Tools meetings and provided by rosauth
https://github.com/WPI-RAIL/rosauth
The key to using MAC is that it does not tie users to a single "user database." It simply requires some trusted third-party to provide the hash-keys. An example could be RMS but it makes not difference if it comes from any other source.
The idea behind the auth
operation would be that any server that enabled authentication would wait for this request to come in first before accepting any other op
code from the client. Once the request comes in, it would verify the information (in a ROS system, using rosauth
, however, the verification method is not tied to ROS). If the authentication is good, the connection would be kept and rosbridge would function as normal. If the authentication is bad, the connection would be severed. In the case that authentication is not enabled on the server, the op
code can be ignored.
Authentication Operation:
{op: 'auth', mac: <string>, client: <string>, dest: <string>, rand: <string>, t: <int>, level: <string>, end: <int>}
mac - MAC (hashed) string given by the client
client - IP of the client
dest - IP of the destination
rand - Random string given by the client
t - Time of the authorization request given by the client
level - User level as a string given by the client
end - End time of the client's session given by the client
rosbridge fuerte had a package just for launch files. Instead, move each launch file to the package it pertains to most.
Need to check if If the topic already exists with the same type, a warning status message is sent and this message is dropped.
which is in ROSBRIDGE_PROTOCOL.md is a typo. See #34 (comment)
rosbridge v2.0 protocol seems it does not support 'Failure of ros service'.
Failure means the service server returns false code.
I think it is better to handle the service result.
Adding
"result": <bool>
field to Service Response JSON will solve this problem.
(And if rosbridge server failed to call service, return JSON with this result:false for the response)
How do you think of this topic?
I am using the latest Debian version of rosbridge_suite under ROS Hydro and Ubuntu 12.04. When I issue two parameter reads in a row as shown below, the two values are always the same even though they are different on the parameter server. Sometimes the two values are the same as the first parameter read and sometimes they are the same as the second parameter read. Here is my test snippet:
var videoTopicParam = new ROSLIB.Param({
ros : ros,
name : param_ns + '/videoTopic'
});
videoTopicParam.get(function(value) {
if (videoTopicParam != null) {
videoTopic = value;
console.log(videoTopic);
}
// Create the video viewer
mjpegViewer = new MJPEGCANVAS.Viewer({
divID : 'videoCanvas',
host : mjpegHost,
port: mjpegPort,
width : videoWidth,
height : videoHeight,
quality: videoQuality,
topic : videoTopic
});
});
// Create a Param object for the max linear speed
var maxLinearSpeedParam = new ROSLIB.Param({
ros : ros,
name : param_ns + '/maxLinearSpeed'
});
// Get the value of the max linear speed paramater
maxLinearSpeedParam.get(function(value) {
console.log('Parameter maxLinearSpeed set to: ' + value);
});
And here is what I see on the web browser console:
Rosbridge connected.
Starting publishers
Video topic set to: /camera/rgb/image_color
Parameter maxLinearSpeed set to: /camera/rgb/image_color
Or sometimes I see this:
Rosbridge connected.
Starting publishers
Video topic set to: 0.2
Parameter maxLinearSpeed set to: 0.2
Is there a way to ensure that the proper assignments are made?
rosbridge_server cannot advertise 'correct' message type if the topic has 'parent' topic.
For example, the topic foo
is already advertised as std_msgs/String
and if rosbridge tries to advertise the topics under foo
such as foo/bar
, the type of the topic is ignored and it will be std_msgs/String
https://github.com/RobotWebTools/rosbridge_suite/blob/develop/rosbridge_library/src/rosbridge_library/internal/services.py#L100 throws an exception for me when the full service name is too long. I believe this happens because a unicode string is passed to the rosservice tool to obtain the service type.
A quick check shows that this might be an upstream issue at, or the fact that unicode strings are not supposed to be passed to the rosservice tool. Some examples are below.
Changing the above line of code from:
service_type = get_service_type(service)
to
service_type = get_service_type(str(service))
should solve the problem.
@dirk-thomas: Do you think this is an upstream issue?
Examples:
piyushk@robot-devil:~/catkin_ws/src/bwi_guidance/bwi_guidance/www$ python
Python 2.7.3 (default, Feb 27 2014, 19:58:35)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from rosservice import get_service_type
>>> get_service_type('/services/bwi_guidance_server_service/person/camera/rgb/image_raw/compressed/set_parameters')
'dynamic_reconfigure/Reconfigure'
>>> get_service_type(u'/services/bwi_guidance_server_service/person/camera/rgb/image_raw/compressed/set_parameters')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/ros/hydro/lib/python2.7/dist-packages/rosservice/__init__.py", line 147, in get_service_type
return get_service_headers(service_name, service_uri).get('type', None)
File "/opt/ros/hydro/lib/python2.7/dist-packages/rosservice/__init__.py", line 123, in get_service_headers
rosgraph.network.write_ros_handshake_header(s, header)
File "/opt/ros/hydro/lib/python2.7/dist-packages/rosgraph/network.py", line 415, in write_ros_handshake_header
s = encode_ros_handshake_header(header)
File "/opt/ros/hydro/lib/python2.7/dist-packages/rosgraph/network.py", line 401, in encode_ros_handshake_header
return struct.pack('<I', len(s)) + s
UnicodeDecodeError: 'ascii' codec can't decode byte 0x96 in position 0: ordinal not in range(128)
>>> get_service_type(u'/services/bwi_guidance_server_service/person/camera/rgb/image_raw/compressed/set_parameters')
KeyboardInterrupt
>>> get_service_type(u'/services/bwi_guidance_server_service/person/camera/rgb/image_raw/compressed/set_parameters')
KeyboardInterrupt
>>> get_service_type('/services/bwi_guidance_server_service/rosapi/service_request_details')
'rosapi/ServiceRequestDetails'
>>> get_service_type(u'/services/bwi_guidance_server_service/rosapi/service_request_details')
'rosapi/ServiceRequestDetails'
>>> get_service_type(u'/services/bwi_guidance_server_service/rosapi/service_response_details')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/ros/hydro/lib/python2.7/dist-packages/rosservice/__init__.py", line 147, in get_service_type
return get_service_headers(service_name, service_uri).get('type', None)
File "/opt/ros/hydro/lib/python2.7/dist-packages/rosservice/__init__.py", line 123, in get_service_headers
rosgraph.network.write_ros_handshake_header(s, header)
File "/opt/ros/hydro/lib/python2.7/dist-packages/rosgraph/network.py", line 415, in write_ros_handshake_header
s = encode_ros_handshake_header(header)
File "/opt/ros/hydro/lib/python2.7/dist-packages/rosgraph/network.py", line 401, in encode_ros_handshake_header
return struct.pack('<I', len(s)) + s
UnicodeDecodeError: 'ascii' codec can't decode byte 0x80 in position 0: ordinal not in range(128)
'/services/bwi_guidance_server_service/rosapi/service_request_details' was the longest service name I was able to process succesfully.
I'm sending the following data to rosbridge_tcp server
{
"op": "publish",
"topic": "/gz/cmd_vel",
"msg": {
"linear": {
"x": 0.8,
"y": 0.2,
"z": 0.3
},
"angular": {
"x": 0.8,
"y": 0.2,
"z": 0.3
}
}
}
Whereas it recognizes the connection, I get an error like this on the rosbridge_tcp side
Exception happened during processing of request from ('127.0.0.1', 54156)
Traceback (most recent call last):
File "/usr/lib/python2.7/SocketServer.py", line 582, in process_request_thread
self.finish_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 323, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python2.7/SocketServer.py", line 640, in init
self.finish()
File "./rosbridge_tcp", line 100, in finish
self.protocol.finish()
How do I solve this. Is this something to do with the data I sent or a bug of the server?
Can you by any chance trigger a new release? Would be great to have all the latest fixes (e.g. launch file location fix) in debians... Thanks!
When services are registered, 'rosapi' namespace is hardcoded. it would be nicer to use local namespace instead of hardcoded 'rosapi'
https://github.com/RobotWebTools/rosbridge_suite/blob/hydro-
devel/rosapi/scripts/rosapi#L42-L62
Related Issue : RobotWebTools/roslibjs#58
rosbridge advertise capabilities uses 'advertise_id' (or simply 'id') to keep track of which clients have requested advertising a given topic and matches these IDs with unadvertise topics to decide whether to actually unadvertisde the topic or not.
See here for example implementation.
On the other hand, roslibjs is using an auto-incremented ID with a different prefix for advertise and unadvertise (see here).
As a result, unadvertise calls will never work, since they always look to rosbridge as coming from a different ID than the corresponding advertise request.
Not sure if I should log this here or in the roslib repo. I'm leaving this here as a finding since I can't pursue this further - I need to work with a workaround instead.
I am thinking of disabling
until we fix the issue. Any objection?
Most rosbridge users will be using the documentation on ros.org. Currently, if you search around for rosbridge on the site, you find one of two things: the old rosbridge with a depreciation notice that can be easily overlooked (someone even released it into groovy...?) or the new rosbridge with a completely blank page.
At the very least, install and run commands should be put up. I also feel the protocol itself should be clearly displayed on the WIKI in HTML. Currently the protocol is hidden on a page within a PDF. Since rosbridge should really be thought of as a protocol, it is important to have this information clearly available. Furthermore, since rosbridge is still "young", it will make it easier to suggest and collaborate on protocol enhancements.
Certain browsers (i.e., Firefox...) won't allow a standard WS connection to be made from a secure page (HTTPS) if it is going to another server. rosbridge should have an option to launch a WSS server (amongst other reasons)
See original issue report here (discussion being moved to this thread instead): https://github.com/RobotWebTools/rosjs/issues/28
during my experimenting and prototyping with rosbridge I found that clients need to add some delay between sending (many) messages (at once) to rosbridge.
So, I added a buffer string to protocol.py for incoming data as well as some code to process this buffer (mainly trying to get complete JSON objects on after another).
This allows rosbridge-clients to send messages without delay and improves rosbridge performance significantly.
This is not a big issue in many cases, but during my tests for fragmentation and service_requests with huge response-messages, rosbridge constantly was not able " .. to deserialize message from client.."
are you aware of this?
is any work-around planned to address this?
my solution for now is just to look for opening and closing brackets and then simply try & error if this part of the buffer can be loaded as json object.
a cleaner solution would be e.g. to send the overall message size right before json message begins..
Let me know if you are interested in merging my changes and extensions into the main rosbridge_suite. I could try to do separate pull requests for each of them. I have done some manual testing of my code but would still need to write some automated unit-tests..
I currently have the code for:
While the CMake depends on geometry_msgs (https://github.com/RobotWebTools/rosbridge_suite/blob/groovy-devel/rosbridge_library/CMakeLists.txt#L4) the package.xml
file does not have a build dependency on it.
The bug has been introduced in 7c9363b#diff-4e6e2b49b382d9309f4c16ccb37a887eR4
The corresponding CI job on Jenkins has been failing since then: http://jenkins.ros.org/job/devel-groovy-rosbridge_suite/
Unregistering does not work correctly. Causes issues when you refresh your webpage and reconnect, for example. Temporary fix is to just remove self.publisher.unregister
from rosbridge_library/internal/publishers.py
.
The example on the site http://rosbridge.org/doku.php?id=writing_a_rosbridge_client_in_python needs two small fixes in order to run for me.
a) The main is missing a ws.run_forever()
, as such:
if __name__=="__main__":
try:
ws = GetLoggersClient('ws://127.0.0.1:9090/')
ws.connect()
ws.run_forever()
except KeyboardInterrupt:
ws.close()
b) The rosrun command is not up to date with the source, it should be rosrun rosbridge_server rosbridge_websocket.py
.
The rostests use packages not listed in the package.xml in rosbridge_library
Mentioned here as well: #44
Server is too vague. May also get confusing if we add socket.io support.
They should stay in the package bin. not global bin.
It's seems that we can't bind to a specific IP adresse:
https://github.com/RobotWebTools/rosbridge_suite/blob/hydro-devel/rosbridge_server/scripts/rosbridge_websocket#L131
We should freeze the current code with minor bug fixing and make hydro branch with major changes.
Topic Subscriber buffers are currently infinite. This is a problem on systems with limited resources when there's a lot of big entries to serialize. Ideally the buffer sizes of the rosbridge subscribers would be taken into account.
Currently using Python's JSON. If performance becomes a bottleneck, we could switch to simplejson or ultrajson.
Pull requests that work with Groovy and catkin gladly accepted!
migrating issue from rosjs. https://github.com/RobotWebTools/rosjs/issues/23
In current implementation rosbridge are not aware of latched topic. It causes a problem when there are multiple rosbridge clients.(e.g only first subscriber receives the latched topic and the follower would not get any message).
I would like to suggest to have latchted:true option parsing handling in rosbridge. Though, this also require some changes in rosjs, it would be the quick way to fix the issue.
It is open question so please feed me any suggestion.
David Betram brought up in the Rosbridge User group implementing fragmentation. Fragmentation is described in the Rosbridge Protocol Specification, but not fully implemented.
I started to just write where the code should be updated, but this turned into more of an explanation of how rosbridge works from incoming client request to returning a subscribed message. The juicy bit is at the end, but hopefully this will help elucidate the rosbridge pipeline.
In conclusion, from what I can tell, it's mostly integrating Subscriber's publish function to handle the "fragment_size" case and utilizing the Fragment helper class. The Fragment helper class is under the capabilities directory, but I think it should be moved to the internals directory and follow a similar pattern to pngcompression.py. In addition to the move, the class will probably need updated as it hasn't been tested or integrated before.
No extra work should be needed by the rosbridge_client. However, a client like roslibjs will need to pass the "fragment_size" attribute when subscribing and need to buffer the fragments and concatenate when receiving, like so:
{ "op": "subscribe", "fragment_size": 10, ... }
It points old ros.js yet.
The functions in rosbridge_suite.internal.message_conversion are generally useful, and it would be nice if they were in their own package
I am just curious if it is worth to release a new deb in groovy.
It seems to have many changes including latch support and tcp.
But do not want to release new features since the current deb is fairly stable enough unless many users want.
I don't know why it is failing in the farm. I will take a look later to fix this issue.
http://jenkins.willowgarage.com:8080/job/ros-groovy-rosbridge-suite_binarydeb_precise_amd64/
I'm using rosbridge with catkin packages on hydro.
ros_rope
(the webserver for the GUI) is started with a python script. At the same time rosbridge_websocket is started. Here's my launchfile:
<launch>
<node name="ros_rope_server" pkg="ros_rope" type="server.py" output="screen" />
<node name="ros_rope_bridge" pkg="rosbridge_server" type="rosbridge_websocket" />
<node name="ros_rope_helper" pkg="ros_rope_helper" type="listener.py" output="screen" />
</launch>
Additionally there's another ROS node ros_rope_test
providing the different services for the gui:
<launch>
<node name="ros_rope_test_server" pkg="ros_rope_test" type="rope_server.py" output="screen" />
</launch>
I start both packages with roslaunch ros_rope server
and roslaunch ros_rope_test server
.
When the ros_rope
executes the first service call to ros_rope_test
, it throws the following exception:
[ERROR] [WallTime: 1396864502.429285] [Client 0] [id: call_service:/get_process_list:2] call_service InvalidPackageException: Unable to load the manifest for package ros_rope_test. Caused by: ros_rope_test
The next calls work without any problem. So this exception is only thrown once after the node is started.
(I already posted this bug here: http://answers.ros.org/question/149531/unable-to-load-the-manifest-for-package/ but no answer yet)
Original discussion started at RobotWebTools/roslibjs#28
Discussion on having rosbridge protocol support advertising services started by @daveconger
Current thoughts on that thread but moved to here to open up more discussion.
Traceback from calling /rosapi/topics:
Traceback (most recent call last): File "/opt/ros/groovy/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py", line 619, in _handle_request response = convert_return_to_response(self.handler(request), self.response_class) File "/wg/stor5/rtoris/Documents/WPI/RAIL/ROS/groovy/src/rosbridge_suite/rosapi/scripts/rosapi", line 68, in get_topics return TopicsResponse(proxy.get_topics()) NameError: global name 'proxy' is not defined [ERROR] [WallTime: 1362512489.827216] Error processing request: global name 'proxy' is not defined
I am running Groovy on Ubuntu 12.04. I just apt-get upgraded my ros-groovy packages (to version 0.5.4-0precise-20140417-0429-+0000) and now code that used to work fine is suddenly broken. I am simply publishing an empty message on a topic from javascript using roslibjs (revision 6) and subscribing with a smach_ros.MonitorState. I get the error: "init() got an unexpected keyword argument 'queue_size'". I have tried several versions of roslibjs, so I assume the problem might lie with recent changes in rosbridge. I wish I had never run 'apt-get upgrade' as everything was working well before I did. Any suggestions on how to fix this error or how to revert back to previous versions of ros-groovy packages that were working before? Thanks!
The python-imaging debian is required. While listed as a build-dep for rosbridge_library, need to confirm it installs correctly (rosdep --from-source...).
When calling services the actual response includes a boolean "result" field; also the values element is a normal JSON object rather than a List.
There were a few TODO items in the defragmentation code inside Pull Request #48. I'm moving the items to this ticket for safe keeping and to track the progress.
Sigh.
Tests are their own package. Should be refactored to work with the package they pertain to.
Testing simple.html with current release causes this error. It seems like changes in rospy causes error.
Traceback (most recent call last):
File "/opt/ros/hydro/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py", line 618, in _handle_request
response = convert_return_to_response(self.handler(request), self.response_class)
File "/home/jihoonl/research/ros/isolate/src/rosbridge_suite/rosapi/scripts/rosapi", line 135, in set_param
rosapi.params.set_param(request.name, request.value)
File "/home/jihoonl/research/ros/isolate/src/rosbridge_suite/rosapi/src/rosapi/params.py", line 53, in set_param
rospy.set_param(name, d)
File "/opt/ros/hydro/lib/python2.7/dist-packages/rospy/client.py", line 494, in set_param
_param_server[param_name] = param_value #MasterProxy does all the magic for us
File "/opt/ros/hydro/lib/python2.7/dist-packages/rospy/msproxy.py", line 140, in __setitem__
self.target.setParam(rospy.names.get_caller_id(), rospy.names.resolve_name(key), val)
File "/usr/lib/python2.7/xmlrpclib.py", line 1224, in __call__
return self.__send(self.__name, args)
File "/usr/lib/python2.7/xmlrpclib.py", line 1578, in __request
verbose=self.__verbose
File "/usr/lib/python2.7/xmlrpclib.py", line 1264, in request
return self.single_request(host, handler, request_body, verbose)
File "/usr/lib/python2.7/xmlrpclib.py", line 1289, in single_request
self.send_request(h, handler, request_body)
File "/usr/lib/python2.7/xmlrpclib.py", line 1391, in send_request
connection.putrequest("POST", handler, skip_accept_encoding=True)
File "/usr/lib/python2.7/httplib.py", line 856, in putrequest
raise CannotSendRequest()
CannotSendRequest
[ERROR] [WallTime: 1398643081.784109] Error processing request:
None
[ERROR] [WallTime: 1398643081.784417] [Client 11] [id: call_service:/rosapi/set_param:2] call_service ServiceException: service [/rosapi/set_param] responded with an error: error processing request:
[ERROR] [WallTime: 1397535382.469766] Exception while converting messages in subscriber callback : 'str' object has no attribute '__slots__'
uuid_msgs/UniqueID : http://docs.ros.org/api/uuid_msgs/html/msg/UniqueID.html
includes fixed size of array which causes a problem while in parsing. We need patch _from_inst in message_conversion.py
jihoonl@whoola:~/research/ros/isolate/src/rosbridge_suite/rosbridge_library/src/rosbridge_library$ rostest rosbridge_library test_capabilities.test
... logging to /home/jihoonl/.ros/log/rostest-whoola-20062.log
[ROSUNIT] Outputting test results to /home/jihoonl/research/ros/isolate/build/test_results/rosbridge_library/rostest-test_capabilities_test_capabilities.xml
Traceback (most recent call last):
File "/home/jihoonl/research/ros/isolate/src/rosbridge_suite/rosbridge_library/test/capabilities/test_call_service.py", line 13, in <module>
from rosbridge_library.capabilities.call_service import CallService
File "/home/jihoonl/research/ros/isolate/src/rosbridge_suite/rosbridge_library/src/rosbridge_library/capabilities/call_service.py", line 34, in <module>
from rosbridge_library.capability import Capability
File "/home/jihoonl/research/ros/isolate/src/rosbridge_suite/rosbridge_library/src/rosbridge_library/capability.py", line 33, in <module>
from rosbridge_library.protocol import InvalidArgumentException
File "/home/jihoonl/research/ros/isolate/src/rosbridge_suite/rosbridge_library/src/rosbridge_library/protocol.py", line 43, in <module>
from rosbridge_library.capabilities.fragmentation import Fragmentation
File "/home/jihoonl/research/ros/isolate/src/rosbridge_suite/rosbridge_library/src/rosbridge_library/capabilities/fragmentation.py", line 33, in <module>
from rosbridge_library.capability import Capability
ImportError: cannot import name Capability
Traceback (most recent call last):
File "/home/jihoonl/research/ros/isolate/src/rosbridge_suite/rosbridge_library/test/capabilities/test_subscribe.py", line 11, in <module>
from rosbridge_library.capabilities import subscribe
File "/home/jihoonl/research/ros/isolate/src/rosbridge_suite/rosbridge_library/src/rosbridge_library/capabilities/subscribe.py", line 36, in <module>
from rosbridge_library.capability import Capability
File "/home/jihoonl/research/ros/isolate/src/rosbridge_suite/rosbridge_library/src/rosbridge_library/capability.py", line 33, in <module>
from rosbridge_library.protocol import InvalidArgumentException
File "/home/jihoonl/research/ros/isolate/src/rosbridge_suite/rosbridge_library/src/rosbridge_library/protocol.py", line 43, in <module>
from rosbridge_library.capabilities.fragmentation import Fragmentation
File "/home/jihoonl/research/ros/isolate/src/rosbridge_suite/rosbridge_library/src/rosbridge_library/capabilities/fragmentation.py", line 33, in <module>
from rosbridge_library.capability import Capability
ImportError: cannot import name Capability
testtest_advertise ... ok
testtest_call_service ... FAILURE!
FAILURE: test [test_call_service] did not generate test results
File "/usr/lib/python2.7/unittest/case.py", line 327, in run
testMethod()
File "/opt/ros/hydro/lib/python2.7/dist-packages/rostest/runner.py", line 162, in fn
self.assert_(os.path.isfile(test_file), "test [%s] did not generate test results"%test_name)
File "/usr/lib/python2.7/unittest/case.py", line 420, in assertTrue
raise self.failureException(msg)
--------------------------------------------------------------------------------
testtest_publish ... ok
testtest_subscribe ... FAILURE!
FAILURE: test [test_subscribe] did not generate test results
File "/usr/lib/python2.7/unittest/case.py", line 327, in run
testMethod()
File "/opt/ros/hydro/lib/python2.7/dist-packages/rostest/runner.py", line 162, in fn
self.assert_(os.path.isfile(test_file), "test [%s] did not generate test results"%test_name)
File "/usr/lib/python2.7/unittest/case.py", line 420, in assertTrue
raise self.failureException(msg)
--------------------------------------------------------------------------------
[ROSTEST]-----------------------------------------------------------------------
[rosbridge_library.rosunit-test_advertise/test_do_advertise][ERROR]-------------
Protocol instance has no attribute 'parameters'
File "/usr/lib/python2.7/unittest/case.py", line 327, in run
testMethod()
File "/home/jihoonl/research/ros/isolate/src/rosbridge_suite/rosbridge_library/test/capabilities/test_advertise.py", line 122, in test_do_advertise
proto = Protocol("hello")
File "/home/jihoonl/research/ros/isolate/src/rosbridge_suite/rosbridge_library/src/rosbridge_library/protocol.py", line 99, in __init__
if self.parameters:
--------------------------------------------------------------------------------
[rosbridge_library.rosunit-test_advertise/test_invalid_arguments][ERROR]--------
Protocol instance has no attribute 'parameters'
File "/usr/lib/python2.7/unittest/case.py", line 327, in run
testMethod()
File "/home/jihoonl/research/ros/isolate/src/rosbridge_suite/rosbridge_library/test/capabilities/test_advertise.py", line 39, in test_invalid_arguments
proto = Protocol("hello")
File "/home/jihoonl/research/ros/isolate/src/rosbridge_suite/rosbridge_library/src/rosbridge_library/protocol.py", line 99, in __init__
if self.parameters:
--------------------------------------------------------------------------------
[rosbridge_library.rosunit-test_advertise/test_invalid_msg_classes][ERROR]------
Protocol instance has no attribute 'parameters'
File "/usr/lib/python2.7/unittest/case.py", line 327, in run
testMethod()
File "/home/jihoonl/research/ros/isolate/src/rosbridge_suite/rosbridge_library/test/capabilities/test_advertise.py", line 95, in test_invalid_msg_classes
proto = Protocol("hello")
File "/home/jihoonl/research/ros/isolate/src/rosbridge_suite/rosbridge_library/src/rosbridge_library/protocol.py", line 99, in __init__
if self.parameters:
--------------------------------------------------------------------------------
[rosbridge_library.rosunit-test_advertise/test_invalid_msg_module][ERROR]-------
Protocol instance has no attribute 'parameters'
File "/usr/lib/python2.7/unittest/case.py", line 327, in run
testMethod()
File "/home/jihoonl/research/ros/isolate/src/rosbridge_suite/rosbridge_library/test/capabilities/test_advertise.py", line 81, in test_invalid_msg_module
proto = Protocol("hello")
File "/home/jihoonl/research/ros/isolate/src/rosbridge_suite/rosbridge_library/src/rosbridge_library/protocol.py", line 99, in __init__
if self.parameters:
--------------------------------------------------------------------------------
[rosbridge_library.rosunit-test_advertise/test_invalid_msg_package][ERROR]------
Protocol instance has no attribute 'parameters'
File "/usr/lib/python2.7/unittest/case.py", line 327, in run
testMethod()
File "/home/jihoonl/research/ros/isolate/src/rosbridge_suite/rosbridge_library/test/capabilities/test_advertise.py", line 68, in test_invalid_msg_package
proto = Protocol("hello")
File "/home/jihoonl/research/ros/isolate/src/rosbridge_suite/rosbridge_library/src/rosbridge_library/protocol.py", line 99, in __init__
if self.parameters:
--------------------------------------------------------------------------------
[rosbridge_library.rosunit-test_advertise/test_invalid_msg_typestrings][ERROR]--
Protocol instance has no attribute 'parameters'
File "/usr/lib/python2.7/unittest/case.py", line 327, in run
testMethod()
File "/home/jihoonl/research/ros/isolate/src/rosbridge_suite/rosbridge_library/test/capabilities/test_advertise.py", line 54, in test_invalid_msg_typestrings
proto = Protocol("hello")
File "/home/jihoonl/research/ros/isolate/src/rosbridge_suite/rosbridge_library/src/rosbridge_library/protocol.py", line 99, in __init__
if self.parameters:
--------------------------------------------------------------------------------
[rosbridge_library.rosunit-test_advertise/test_missing_arguments][ERROR]--------
Protocol instance has no attribute 'parameters'
File "/usr/lib/python2.7/unittest/case.py", line 327, in run
testMethod()
File "/home/jihoonl/research/ros/isolate/src/rosbridge_suite/rosbridge_library/test/capabilities/test_advertise.py", line 27, in test_missing_arguments
proto = Protocol("hello")
File "/home/jihoonl/research/ros/isolate/src/rosbridge_suite/rosbridge_library/src/rosbridge_library/protocol.py", line 99, in __init__
if self.parameters:
--------------------------------------------------------------------------------
[rosbridge_library.rosunit-test_advertise/test_valid_msg_classes][ERROR]--------
Protocol instance has no attribute 'parameters'
File "/usr/lib/python2.7/unittest/case.py", line 327, in run
testMethod()
File "/home/jihoonl/research/ros/isolate/src/rosbridge_suite/rosbridge_library/test/capabilities/test_advertise.py", line 112, in test_valid_msg_classes
proto = Protocol("hello")
File "/home/jihoonl/research/ros/isolate/src/rosbridge_suite/rosbridge_library/src/rosbridge_library/protocol.py", line 99, in __init__
if self.parameters:
--------------------------------------------------------------------------------
[rosbridge_library.rosunit-test_publish/test_invalid_arguments][ERROR]----------
Protocol instance has no attribute 'parameters'
File "/usr/lib/python2.7/unittest/case.py", line 327, in run
testMethod()
File "/home/jihoonl/research/ros/isolate/src/rosbridge_suite/rosbridge_library/test/capabilities/test_publish.py", line 34, in test_invalid_arguments
proto = Protocol("hello")
File "/home/jihoonl/research/ros/isolate/src/rosbridge_suite/rosbridge_library/src/rosbridge_library/protocol.py", line 99, in __init__
if self.parameters:
--------------------------------------------------------------------------------
[rosbridge_library.rosunit-test_publish/test_missing_arguments][ERROR]----------
Protocol instance has no attribute 'parameters'
File "/usr/lib/python2.7/unittest/case.py", line 327, in run
testMethod()
File "/home/jihoonl/research/ros/isolate/src/rosbridge_suite/rosbridge_library/test/capabilities/test_publish.py", line 25, in test_missing_arguments
proto = Protocol("hello")
File "/home/jihoonl/research/ros/isolate/src/rosbridge_suite/rosbridge_library/src/rosbridge_library/protocol.py", line 99, in __init__
if self.parameters:
--------------------------------------------------------------------------------
[rosbridge_library.rosunit-test_publish/test_publish_works][ERROR]--------------
Protocol instance has no attribute 'parameters'
File "/usr/lib/python2.7/unittest/case.py", line 327, in run
testMethod()
File "/home/jihoonl/research/ros/isolate/src/rosbridge_suite/rosbridge_library/test/capabilities/test_publish.py", line 41, in test_publish_works
proto = Protocol("hello")
File "/home/jihoonl/research/ros/isolate/src/rosbridge_suite/rosbridge_library/src/rosbridge_library/protocol.py", line 99, in __init__
if self.parameters:
--------------------------------------------------------------------------------
Hi,
I am using ubuntu 12.10 and I have ros electric.
How can I get and install rosbridge, from robot web tools?
Thank you
I would like the ROSBridge server to return subscription ids along with
messages. This would allow me, on the client side, to associate received
messages with the components that requested the subscription. Then a
component, could, for example, unsubscribe after it receives N messages.
The pull request(#79) extends advertise capability to handle latch topic advertisement request from client.
The appropriate rostest should be added in here https://github.com/RobotWebTools/rosbridge_suite/blob/hydro-devel/rosbridge_library/test/capabilities/test_advertise.py
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.