rapp-project / rapp-api Goto Github PK
View Code? Open in Web Editor NEWThe Robotic Applications API
Home Page: http://rapp-project.eu
License: Other
The Robotic Applications API
Home Page: http://rapp-project.eu
License: Other
@akintsakis please post the new service's specifications (if they have been finalized).
What is metric and why it is Int? @athallas
I've tried to run example face_detect
application from both devel
and cpp
branch. I have platform compiled today, from the setup scripts, on clean machine. When running python tests, web service shows this output on terminal:
40 ACCEPT: localhost [Mon, 25 Jul 2016 15:26:01 +0200]
40 REQUEST.serv: POST *://anonymous@localhost:9001 /hop/face_detection HTTP/1.1
40 INVOKE.svc (face_detection . #|JsObject [__proto__: JsObject] [extensible: #t] [properties: ()] [cmap: JsConstructMap] [elements: vector]|)
But when running C++ example, output is a little bit different:
41 ACCEPT: localhost [Mon, 25 Jul 2016 15:37:07 +0200]
41 REQUEST.serv: POST *://anonymous@localhost:9001 /hop/face_detection HTTP/1.1
41 INVOKE.svc (face_detection)
Output from the face_detect
is:
face detect: /home/rapp/rapp_platform/rapp-platform-catkin-ws/src/rapp-platform/rapp_testing_tools/test_data/face_samples/etsardou_close_angle.jpg
found 0 faces!
And application is not finishing, it hangs instead (must be killed by CTRL+C).
Given test file, when passed directly to ROS service (by rosservice
call), produces expected output (one face).
Similar to this one: https://github.com/rapp-project/rapp-api/blob/master/python/RappCloud/README.md
@klpanagi could you please migrate the Python tests under the API? AFAIK they are currently under the platform.
In branch cpp
, CMakeLists.txt has wrong install target for headers. It should be:
# Header install dir
install (DIRECTORY ${INCLUDES}/ DESTINATION ${CMAKE_INSTALL_PREFIX}/include/${PROJECT_NAME} FILES_MATCHING PATTERN "*.hpp" PATTERN "*.ihh")
# Install Global header
install (FILES ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/${PROJECT_NAME})
Current plan_path_2d cloud API implementation is copy-paste of a speech API method. Proper plan_path_2d method implementation is required to the incoming release. Could you help me with the issue?
Must add keywords
or else error is returned.
After applying the merge that I mention in the tittle, I tried to build the API along with the tests:
cmake .. -DBUILD_TESTS=ON
make
Make failed with the following output:
Scanning dependencies of target lrapp [ 9%] Building CXX object CMakeFiles/lrapp.dir/includes/config/config.cpp.o [ 36%] Building CXX object CMakeFiles/lrapp.dir/includes/cloud/asio/asio_http/asio_http.cpp.o [ 18%] Building CXX object CMakeFiles/lrapp.dir/includes/cloud/asio/asio_handler/asio_handler.cpp.o [ 27%] Building CXX object CMakeFiles/lrapp.dir/includes/cloud/asio/asio_https/asio_https.cpp.o [ 36%] Built target lrapp Scanning dependencies of target rapp.0.6 [ 45%] Linking CXX shared library librapp.0.6.so [ 45%] Built target rapp.0.6 Scanning dependencies of target serialise_test Scanning dependencies of target service_test Scanning dependencies of target object_test [ 54%] Building CXX object CMakeFiles/service_test.dir/tests/service_test.cpp.o [ 63%] Building CXX object CMakeFiles/object_test.dir/tests/object_test.cpp.o [ 72%] Building CXX object CMakeFiles/serialise_test.dir/tests/serialise.cpp.o In file included from /home/leizer/rapp-api/cpp/includes/objects.hpp:13:0, from /home/leizer/rapp-api/cpp/tests/serialise.cpp:5: /home/leizer/rapp-api/cpp/includes/objects/pose_stamped/pose_stamped.hpp:21:27: error: ‘msg_metadata’ in namespace ‘rapp::object’ does not name a type const rapp::object::msg_metadata header, ^ /home/leizer/rapp-api/cpp/includes/objects/pose_stamped/pose_stamped.hpp:50:16: error: ‘msg_metadata’ in namespace ‘rapp::object’ does not name a type rapp::object::msg_metadata header; ^ /home/leizer/rapp-api/cpp/includes/objects/pose_stamped/pose_stamped.hpp: In constructor ‘rapp::object::pose_stamped::pose_stamped(int, rapp::object::pose)’: /home/leizer/rapp-api/cpp/includes/objects/pose_stamped/pose_stamped.hpp:24:7: error: class ‘rapp::object::pose_stamped’ does not have any field named ‘header’ : header(header), pose(pose) ^ /home/leizer/rapp-api/cpp/includes/objects/pose_stamped/pose_stamped.hpp: In member function ‘bool rapp::object::pose_stamped::operator==(const rapp::object::pose_stamped&) const’: /home/leizer/rapp-api/cpp/includes/objects/pose_stamped/pose_stamped.hpp:36:17: error: ‘const struct rapp::object::pose_stamped’ has no member named ‘header’ return (this->header == rhs.header) && ^ /home/leizer/rapp-api/cpp/includes/objects/pose_stamped/pose_stamped.hpp:36:31: error: ‘const struct rapp::object::pose_stamped’ has no member named ‘header’ return (this->header == rhs.header) && ^ /home/leizer/rapp-api/cpp/includes/objects/pose_stamped/pose_stamped.hpp: In member function ‘boost::property_tree::ptree rapp::object::pose_stamped::treefy() const’: /home/leizer/rapp-api/cpp/includes/objects/pose_stamped/pose_stamped.hpp:44:34: error: ‘header’ was not declared in this scope tree.add_child("header", header.treefy()); ^ /home/leizer/rapp-api/cpp/tests/serialise.cpp: In function ‘int main(int, char**)’: /home/leizer/rapp-api/cpp/tests/serialise.cpp:32:45: error: no matching function for call to ‘rapp::object::pose_stamped::pose_stamped(rapp::object::pose_metadata&, rapp::object::pose&)’ rapp::object::pose_stamped ps(meta, pose); ^ In file included from /home/leizer/rapp-api/cpp/includes/objects.hpp:13:0, from /home/leizer/rapp-api/cpp/tests/serialise.cpp:5: /home/leizer/rapp-api/cpp/includes/objects/pose_stamped/pose_stamped.hpp:31:5: note: candidate: constexpr rapp::object::pose_stamped::pose_stamped(const rapp::object::pose_stamped&) pose_stamped(const rapp::object::pose_stamped &) = default; ^ /home/leizer/rapp-api/cpp/includes/objects/pose_stamped/pose_stamped.hpp:31:5: note: candidate expects 1 argument, 2 provided /home/leizer/rapp-api/cpp/includes/objects/pose_stamped/pose_stamped.hpp:28:5: note: candidate: constexpr rapp::object::pose_stamped::pose_stamped() pose_stamped() = default; ^ /home/leizer/rapp-api/cpp/includes/objects/pose_stamped/pose_stamped.hpp:28:5: note: candidate expects 0 arguments, 2 provided /home/leizer/rapp-api/cpp/includes/objects/pose_stamped/pose_stamped.hpp:20:2: note: candidate: rapp::object::pose_stamped::pose_stamped(int, rapp::object::pose) pose_stamped( ^ /home/leizer/rapp-api/cpp/includes/objects/pose_stamped/pose_stamped.hpp:20:2: note: no known conversion for argument 1 from ‘rapp::object::pose_metadata’ to ‘int’ [ 81%] Linking CXX executable object_test [ 81%] Built target object_test CMakeFiles/serialise_test.dir/build.make:62: recipe for target 'CMakeFiles/serialise_test.dir/tests/serialise.cpp.o' failed make[2]: *** [CMakeFiles/serialise_test.dir/tests/serialise.cpp.o] Error 1 CMakeFiles/Makefile2:141: recipe for target 'CMakeFiles/serialise_test.dir/all' failed make[1]: *** [CMakeFiles/serialise_test.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... [ 90%] Linking CXX executable service_test [ 90%] Built target service_test Makefile:138: recipe for target 'all' failed make: *** [all] Error 2
@athallas will post the specifications when they have been finalized.
RappCloud/ServiceController/Adapters.py", line 35, in
ImportError: No module named packages.urllib3.poolmanager
The sample is:
from RappCloud.CloudMsgs import OntologySubclasses
from RappCloud import RappPlatformService
svc = RappPlatformService()
msg = OntologySubclasses()
# Ontology subclasses of Oven query
msg.ontology_class = 'Oven'
msg.recursive = False
response = svc.call(msg)
But the respective ROS service gets no input (ontology_class=""
). If transformed to the one below it works:
from RappCloud.CloudMsgs import OntologySubclasses
from RappCloud import RappPlatformService
mesg= OntologySubclasses(ontology_class='Oven', recursive=False)
svc = RappPlatformService(msg=mesg)
response = svc.call()
Hi @alexge233, @klpanagi!
asio error: End of file
full client log concerning path_planning
service:
POST /hop/path_planning_plan_path_2d HTTP/1.1
Host: 155.207.19.229:9001
User-Agent: rapp_api/cpp/0.6.0
Connection: close
Accept: */*
Accept-Token: rapp_token
Content-Length: 476
Content-Type: multipart/form-data; boundary=bnEqpWAK5fONDmfE
--bnEqpWAK5fONDmfE
Content-Disposition: form-data; name="json"
{"map_name":"empty","robot_type":"NAO","algorithm":"dijkstra","":{"header":{"seq":"0","frameid":"frame_x","stamp":{"sec":"0","nsec":"10"}},"pose":{"position":{"x":"1","y":"1","z":"0"},"orientation":{"x":"1","y":"2","z":"2","w":"3"}}},"":{"header":{"seq":"1","frameid":"frame_x","stamp":{"sec":"0","nsec":"10"}},"pose":{"position":{"x":"2","y":"2","z":"0"},"orientation":{"x":"5","y":"6","z":"6","w":"7"}}}}
asio error: End of file
, but the log above shows:
start orientation: 1 2 2 3
goal orientation 5 6 6 7.
Hi,
Can we please have a valid data example for the service call plan_path_2d
?
We tried using arbitrary values and we didn't get an error but no response either.
@MariaRamos89 has committed d49882f to branch cpp_dev
, and tried using the python example which returns nothing.
The example that did work was the default values in the path planning example in branch cpp-wut
.
Many thanks,
A.
Re-using same objects (via pointers) throws a boost error:
error: Operation canceled
This is because protected members such as content_length_
and others are not reset.
Currently the only solution is to not re-use cloud objects, but to allocate new ones.
Manually implement an assignment or copy constructor which resets those fields.
Noone will be able to find this:
https://github.com/rapp-project/rapp-api/blob/master/python/RappCloud/CloudMsgs/README.md
Update the table in README.md on documentation
branch for js
and cpp
API implementations.
The face_detection service should have one more parameter: A bool called "fast". If true it provides fast face detection suitable for tracking.
This feature exists in the devel branch of rapp-platform
@lpenteri from what I can tell, the JS API does not escape quotes, double or single or other characters that may create problems. Please Fix this.
I propose that rapp::object::header
to be renamed to rapp::object::meta
or similar.
Header implies TCP/IP and since we have similar usage, it could be confusing.
Furthermore, it is unclear what seq
is, and what frameid
is.
Please update documentation via Doxygen comments.
Also, is there a reason why all those objects are struct
and not class
?
Please see latest cpp
code before refactoring, I will solve conflicts based on new name.
weather web services have mgs instead of msg
There appears to be missing a region
entry from the geolocation cloud class.
Consider assigning installation paths using CMAKE_INSTALL_PREFIX argument to cmake to allow modifications through cmake's cli.
Edit
Consider this issue to be critical! It affects setup and installation of the rapp-robot-nao. Check related issue here
Perform auto attribute check on:
Current rapp::object::time deserialisation from JSON ignores seconds and only uses nanoseconds.
The example is unclear. First make the call and then add the path in the request?
Hi @alexge233, @klpanagi !
I tied to run the path_planner example and it failed. We've tested it with our cloud also. Python API call works well.
The map files are not being saved in the cloud.
Client log:
png: /home/wojciech/rapp/rapp-platform/rapp_path_planning/rapp_map_server/maps/empty.png
yaml: /home/wojciech/rapp/rapp-platform/rapp_path_planning/rapp_map_server/maps/empty.yaml
m_name: my_map
upload status:
pose_goal: 0.2 0.2 0 0 0 0 1
asio error: End of file
Cloud log:
No map image file received
I've just created C++ example for speech_to_text service (see post_builder branch f78efef). Service is called properly on platform side, but on the API side there is a bug with handling long responses, sent in multipile TCP packets. Class asio_service_http treats every packet independently, which results in error:
no double return after header
when second part of data is retrieved. As a result for request to say "test" in english "en", first packet received by asio_service_http is:
Content-Length: 39940
Connection: close
Content-type: application/json; charset=UTF-8
Server: Hop
{"payload":"UklGRsR0AABXQVZFZm10IBAAAAABAAEAgD4AAAB9AAACABAAZGF0YaB0AAD//wAAAAD//wAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAP////8AAAEAAAD/////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//wAAAQAAAAAAAQAAAAAA//8AAAAA/////wAA
AAABAAAAAQD//wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//wAAAAAAAP////8AAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAD//wAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAEA//8AAAAAAAAAAAAAAAA
and then next packet comes, obviously without the header (as it is just continuation of previous data):
AAAAAAAAAAAAAAAABAAAA/////wEAAAABAAAAAAAAAAAAAAD//wAAAAD//wEAAAAAAP////8AAAAAAAAAAA
EAAQAAAAAAAAAAAAAAAAD//wAAAAABAP//AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAP//AQAAAAAA//8AAAAAAAAAAAEA
AAD//wAAAAAAAAAAAAABAP//AAAAAAAAAAABAAAAAAAAAAAAAAABAAAAAAD//wAAAAAAAAAA/////wAA/////wAAAAAAAP//AAABAAAAAA
D//wEA//8AAAAAAAAAAP//AAAAAAAAAQAAAAEAAAAAAAAAAQAAAAEAAAD//wAA//8AAAAAAQAAAP//AAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAEAAQAAAAAAAAAAAAAAAAD//wEAAAAAAAAAAAABAAEAAQAAAAAAAAAAAP//AAAAAAAAAAD//wAAAAD//wAAAAD//wAAAQD//w
EAAQA
which triggers before-mentioned exception.
When running npm test
in js
subdirectory, following output is produced (all errors looks similar):
#ontology_superclasses_of()
{ [Error: socket hang up] code: 'ECONNRESET' }
For this call, web service prints following output:
1 ACCEPT: localhost [Wed, 27 Jul 2016 14:07:29 +0200]
1 ABORT: &hop-method-error
*** ERROR:request-line-grammar:
Method not implemented -- ���������Xv�);����V�rW�,h�f1W�Yt����9��J���/�+�0�,��'g�(k�$���
����jih9876�2�.�*�&���=5�#��� ���@?>3210�1�-�)�%����</�����
��f
localhost
����
���������
1. &pool-scheduler1070,
API branch: devel
Platform branch: devel
@dudekw The implementation of rapp::object::time
is dangerous and flawed:
int32_t
I suggest it becomes a wrapper around either std::crhono
or boost::posix_time
In the test
directory you can see how I instantiate it:
https://github.com/rapp-project/rapp-api/blob/cpp/cpp/tests/serialise.cpp
Furthermore, implicit casting to int32_t
is tricky and potentially very dangerous.
class asio_timer
is commented in all code, uncomment and test.
@dudekw Same as with header
this should probably be renamed to coordinate
or cartesian
.
Also, why is it a struct
?
Please see latest cpp
code before renaming it, and I will solve conflicts.
The Gitter badge in the master branch points to the wrong link: link
Also it seems misplaced, probably due to erroneous merging of the pull request.
@klpanagi
Authentication (in C++) is hardcoded into qr_detection in cpp/includes/cloud/qrDetector/qrDetector.hpp.
If we need token-based authentication, it must be implemented across the API/Lanugages,
else this can be removed.
This has nothing to do with SSL/TLS https sockets which should be implemented in the next version.
Must wait for @maciek-slon to fully integrate the node.
The core of the ServiceController must automatically identify closed persistent connections, from server, and reinitialize them.
RFC-7230
Request in ROS node:
city: Athens
weather_reporter: ''
metric: 0
Response in ROS node:
{'wind_speed': '0.32', 'temperature': '59.53', 'wind_direction': '', 'visibility': '9.05', 'humidity': '0.88', 'pressure': '1022.65', 'date': '1464173287', 'weather_description': 'Clear', 'wind_temperature': ''}
Response of Python API call:
{'wind_speed': '', 'temperature': '', 'wind_direction': '', 'visibility': '', 'humidity': '', 'pressure': '', 'error': u'', 'date': '', 'weather_description': '', 'wind_temperature': ''}
In response sentences
or alternatives
?
Is the path_upload_map
upload files or simply using string names?
I see a png_file
param and a yaml_file
param: is the first a PNG file or just the name of it?
Same with yaml file, is it a file or a file name?
A.
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.