https://github.com/robotology/yarp.js

sort by:
Revision Author Date Message Commit Date
d24d37a Merge pull request #52 from S-Dafarra/master Avoid to use yarp mutex in YarpJS_Callback.h 19 July 2023, 07:12:04 UTC
a7cc17f Avoid to use yarp mutex in YarpJS_Callback.h 18 July 2023, 16:46:39 UTC
08c9c2c Leave to YARP the pixel code (channel order) conversion aligned with OpenCV (BGRa) - We use `yarp::sig::Image::copy` for copying a base class object `yarp::sig::Image` into a derived one `yarp::sig::ImageOf<PixelBgr>`, which converts the pixel code. - This way we can avoid using directly the OpenCV library method `yarp::cv::toCvMat` to do the pixel code conversion which requires having to select a specialisation of the templated method depending on the pixel code. - We still replaced `cv::cvarrToMat` by `yarp::cv::toCvMat<yarp::sig::PixelBgr>` because the first has been deprecated. - For not loosing the alpha channel, we use the type `yarp::sig::PixelBgra` instead of `yarp::sig::PixelBgr`for accounting for an eventual alpha channel. 17 April 2022, 20:26:23 UTC
cb1c162 Use PixelBgra code instead of PixelBgr accounting for eventual alpha channel 15 April 2022, 21:27:22 UTC
d8bd494 Use `yarp::sig::Image::copy` instead of `cv::toCvMat` which simplifies the implementation - This allows to avoid having to select a specialisation of `yarp::cv::toCvMat` depending on the pixel code, and instead, always use the specialization `yarp::cv::toCvMat<yarp::sig::PixelBgr>` respective to the destination image. - The drawback is that we loose the alpha channel, as per the actual implementation of `yarp::sig::Image::copy`. 15 April 2022, 19:12:25 UTC
52d21d1 WIP:Leave to YARP the pixel code (channel order) conversion aligned with OpenCV (BGRx) 15 April 2022, 14:49:41 UTC
f100ce6 Minor fix after review 14 April 2022, 19:34:37 UTC
7aedb86 Implement custom exception for color conversion code map 14 April 2022, 00:53:32 UTC
013c926 Fix color channel order in the jpeg compression input image Refer to issue 41. - OpenCV library assumes the color channel order to be BGR or BGRA. - before calling `cv::imencode()`, use `cv::cvtColor()` for converting the original channel order into BGR or BGRA. - an exception is raised for non supported pixel codes. 13 April 2022, 23:53:20 UTC
b3d0a53 Fix 'Stream Video' demo image shaking - The image was trembling due to the display of the HTML element 'write-time'. This element is the image frame refresh interval oscillating between ~9 and ~11 ms, which results in a element length toggling. - As the image has a display 'inline-block' style, it flickers along with the 'write-time' length. - We just use a line break to avoid this effect. 04 April 2022, 15:31:07 UTC
f49afae Fix 'Stream Video' demo image scaling 04 April 2022, 15:26:35 UTC
d2e4609 Merge pull request #33 from robotology/fix/issue-32-segmentation-fault Fix node.js random segmentation fault due to race condition in YarpJS_Callback::onRead 19 January 2022, 14:03:14 UTC
1480f9a Move the copy of _datum (latch) into the callCallback function - The goal is to keep the handling of the mutex in `YarpJS_Callback` class. - Overload the `YarpJS_Callback<T>::callCallback` function with the `_datum` argument, and do the datum latch in that function after the mutex lock. - Create an alias of the type parameter `T` (from the template class `yarp::os::BufferedPort<T>`) as a property of the template class (`typedef T datumType`) and use it for the `callCallback` argument. - Moving the _datum copy after the mutex lock was done only on the template class `YarpJS_BufferedPort` for now since: - `_YarpJS_RPCReplier`: we wait for the RPC server internal reply before completing the "read" cycle so datum.read() won't be called again before the callback processing is over, so no race condition here. - `_YarpJS_PortReplier`, `_YarpJS_PortWriteReplier`: RPC handling behaviour shall be analysed later. 19 January 2022, 00:24:48 UTC
9d34dd8 Fix node.js random segmentation fault due to race condition in YarpJS_Callback::onRead - The data read from the Yarp port in `_datum` is copied to `this->datum` while the callback `YarpJS_Callback<T>::_internal_worker_end()` is still reading it. - This is due to the `YarpJS_Callback<T>::mutex_callback.lock()` being called after the `_datum` copy. - Fix: we copy the mutex lock before the `_datum` copy. For this, we define `YarpJS_Callback<T>::lockMutex()` and call it from `YarpJS_BufferedPort::onRead()` before the _datum copy. 13 January 2022, 11:46:11 UTC
d54dc55 Update a few dependencies versions in package-lock.json 13 January 2022, 11:43:33 UTC
42763cf Merge pull request #30 from robotology/feature/upgrade-to-nodejs-lts-14-17 Upgrade yarp.js to support node.js v14.17.0 21 December 2021, 11:51:18 UTC
690dae6 Updated tag in package.json 21 December 2021, 11:46:29 UTC
6251c79 Update README.md Required Node.js version changed. 20 December 2021, 10:28:01 UTC
be92fa6 Committed the package-lock.json 17 December 2021, 19:28:22 UTC
7e6428d Fixed further errors and warnings ==== Fixed Errors: - **error: too few arguments to function call, single argument 'context' was not specified** Patterns causing the error: ```c++ Nan::FunctionCallbackInfo<v8::Value> &info info[0]->ToString() ``` ```c++ typedef const FunctionCallbackInfo<v8::Value>& NAN_METHOD_ARGS_TYPE; #define NAN_METHOD(name) Nan::NAN_METHOD_RETURN_TYPE name(Nan::NAN_METHOD_ARGS_TYPE info) NAN_METHOD(YarpJS_RPCPort::Open) { ... v8::String::Utf8Value _port_name(info[0]->ToString()); ... } ``` Same use case with `info[0]->IntegerValue()`: ```c++ V8_WARN_UNUSED_RESULT Maybe<int64_t> IntegerValue( Local<Context> context) const; ``` => Add argument `Nan::GetCurrentContext()`. - **error: no matching function for call to 'Unwrap'** (no viable conversion from 'MaybeLocal<v8::Object>' to 'Local<v8::Object>') Pattern causing the error: ```c++ YarpJS_Bottle* target = Nan::ObjectWrap::Unwrap<YarpJS_Bottle>(info[0]->ToObject(...)); ``` => Replace argument by `info[0]->ToObject(...).ToLocalChecked()`. - **error: no matching constructor for initialization of 'v8::String::Utf8Value'** (no known conversion from 'MaybeLocal<v8::String>' to 'const v8::String::Utf8Value' for 1st argument) Prototype of the constructor changed from: ```c++ explicit Utf8Value(Local<v8::Value> obj); ``` to ```c++ Utf8Value(Isolate* isolate, Local<v8::Value> obj); ``` ===== Note: class Isolate Isolate represents an isolated instance of the V8 engine. V8 isolates have completely separate states. Objects from one isolate must not be used in other isolates. The embedder can create multiple isolates and use them in parallel in multiple threads. An isolate can be entered by at most one thread at any given time. The Locker/Unlocker API must be used to synchronize. Use static method `Isolate::GetCurrent()`. ```c++ namespace v8 public: static Isolate *Isolate::GetCurrent() Returns the entered isolate for the current thread or NULL in case there is no current isolate. This method must not be invoked before V8::Initialize() was invoked. ``` - **error: no viable conversion from 'Maybe<int64_t>' (aka 'Maybe<long long>') to 'int'** Example: ```c++ int compression_quality = info[0]->IntegerValue(Nan::GetCurrentContext()); ``` Since `info[0]->IntegerValue(Nan::GetCurrentContext())` returns `Maybe<int64_t>`, we need to convert the output to `int64_t`, using: ```c++ V8_INLINE T v8::Maybe::FromMaybe(const T& default_value) const { return has_value ? value : default_value; } ``` (refer to class `Maybe` definition in `v8.h`). ==== Fixed Warnings: - **warning: 'Mutex' is deprecated: Use std::mutex instead** - **warning: 'tryLock' is deprecated: Use try_lock() instead** ==== Non fixed warnings: - **warning: 'Call' is deprecated [-Wdeprecated-declarations]** Pattern causing the error: ```c++ tmp_this->callback->Call(tmp_arguments.size(),tmp_arguments.data()); ``` --> in `yarp.js/YarpJS/include/YarpJS_Callback.h:124:25`. - **warning: address of function 'Nan::Null' will always evaluate to 'true'** Example: ```c++ v8::Local<v8::Value> argv[1] = {Nan::New(Nan::Null)}; ``` --> in `yarp.js/YarpJS/src/YarpJS_BufferedPort_Bottle.cpp:93:44`. --> in `yarp.js/YarpJS/src/YarpJS_BufferedPort_Sound.cpp:23:46`. - **warning: 'getIplImage' is deprecated: Use yarp::cv::toCvMat instead** Example: ```c++ internalImage = cv::cvarrToMat((IplImage *) this->getYarpObj()->getIplImage()); ``` --> in `yarp.js/YarpJS/src/YarpJS_Image.cpp:23:69`. 17 December 2021, 19:16:43 UTC
b9199f0 Fix: no known conversion from 'MaybeLocal<v8::Object>' to 'v8::Local<v8::Object>' for 1st argument of 'Nan::ObjectWrap::Unwrap<...>(...)' 16 December 2021, 22:54:24 UTC
a724823 Fix missing context in call to `MaybeLocal<Object> ToObject()` 16 December 2021, 14:33:53 UTC
d9043fa Review `info.GetReturnValue().Set()` and `cons->NewInstance()` fixes - Since we don't have a particular default value to use in fromMaybe(...), we just convert the MaybeLocal<T> to Local<T>, when required, through the method ToLocalChecked() which returns an empty object if the wrapped variable is null. - If a v8::Value is expected instead of an v8::Object, we can still return an Object, (typically the case of Nan::NewInstance() method), since v8::Object derive from v8::Value (https://v8docs.nodesource.com/node-8.16/db/d85/classv8_1_1_object.html) 16 December 2021, 13:55:31 UTC
335c8f4 Propagate fix to `info.GetReturnValue().Set()` and `cons->NewInstance()` 16 December 2021, 11:08:02 UTC
2d39ca7 Fix error: no matching member function for call to 'Set' in macros YARPJS_BASE and YARPJS_INIT - Fixed error: 'no matching member function for call to NewInstance'. This was a mismatch in the arguments of v8::Local<v8::Function>.NewInstance()` due to an API change. - Fix error: 'no matching member function for call to 'Set' in macros YARPJS_BASE and YARPJS_INIT'. Add in `info.GetReturnValue().Set()` call the missing conversion from `Nan::MaybeLocal<>` to `v8::Local<>` using `Nan::MaybeLocal<v8::Object>::FromMaybe()`. - Remove duplicate definition of YARPJS_BASE and YARPJS_INIT macros. 04 December 2021, 05:19:46 UTC
b1d3284 Fix 'minimum cmake version required' warning and YARPJS_BASE and YARPJS_INIT macro definitions 03 December 2021, 05:27:23 UTC
d703f9b Tentative upgrade of yarp.js to support node.js v14.17.0 - Update cmake-js and socket.io to version "latest" in package.json => cmake-js resolves to v6.3.0. => socket.io resolves to v4.4.0 - Build is still failing 02 December 2021, 20:46:58 UTC
3eb9148 Workaround: remove listener to 'exit' event closing the ports for avoiding blocking call to _port.close() - Refer to issue https://github.com/ami-iit/yarp-openmct/issues/59. 16 November 2021, 00:26:42 UTC
b15c8d4 Fix SIGINT, SIGTERM callback functions and add SIGQUIT callback The intended behavior is the following: - A first closure signal SIGxxxx triggers an `exit` event which triggers the `exit` listeners (closure of the ports, etc). - If the process then exits on its own, those listeners are not triggered again by the generated `exit` event. - An eventual second closure signal SIGxxxx is processed by the default handler. Implementation: - Add a listener callback for the SIGQUIT which is a signal that parent processes can use to gracioulsy terminate child processes. - When such signals are captured, just send an `exit` event instead of calling 'process.exit()' which forces the process to exit. - Call only once the `exit` listeners such that they are not called again when the process exits on its own generating a new `exit` event. 04 November 2021, 18:13:06 UTC
ceddda8 Fix #22: Fix RPC replies, adding the string format of the any bottle sent through socket.io - Any Yarp message read from a port is forwarded to the browser through socket.io interface (io.emit()) as an Bottle.toSend() object, which is composed of two fields: the "obj_type" and the "content". - "obj_type" is a Bottle.toObject() object which does not include the VOCABs encoded in the message. - We add, along with the "content" a "contentStr", the string format Bottle.toString() of the message. This was the most conservative solution not impacting any processing done on the existing "content" field, although we might lose some performance. 22 August 2021, 19:25:28 UTC
be28630 Some minor cleanup on the 'stream video' example 14 June 2021, 04:12:09 UTC
a62a35f Remove extra lines 14 June 2021, 01:24:56 UTC
3303cbd Improved Simple Example - Added link to "Simple Example" in the main page. - Minor refactoring of the https version of the js. - Fixed the style and the display of the port '/yarpjs/simple_example:i' input data. 11 June 2021, 02:19:33 UTC
33167ec Merge pull request #18 from nunoguedelha/fix/typo-in-include-cv-header Fix includes and define IMWRITE_PNG_COMPRESSION and IMWRITE_JPEG_QUALITY in cv:: namespace 10 June 2021, 15:22:15 UTC
bba1384 Updated 'socket.io' dependency with one compatible with node v4.2.2 09 June 2021, 18:50:08 UTC
8dc41ea Fix includes and define IMWRITE_PNG_COMPRESSION and IMWRITE_JPEG_QUALITY in cv:: namespace 07 June 2021, 23:27:51 UTC
56df066 Update package.json 02 March 2021, 14:10:40 UTC
869d72c Update package.json 04 May 2020, 12:20:12 UTC
5c5dec9 removing lock, should not be committed 06 April 2020, 08:05:47 UTC
7655139 added method waitForWrite() 28 February 2019, 13:00:23 UTC
d33b028 Update package-lock.json 28 February 2019, 11:43:51 UTC
aaf3644 Update package-lock.json 29 October 2018, 10:05:43 UTC
7981816 Update package-lock.json 29 October 2018, 09:59:59 UTC
0797a93 Update package-lock.json 29 October 2018, 09:54:53 UTC
cc0df48 Update package-lock.json 29 October 2018, 09:50:01 UTC
c520868 updating vulnerabilities 29 October 2018, 09:49:21 UTC
433c6df Merge pull request #16 from GiuliaDAngelo/setStrict Adding of setStrict() to force BufferedPort to Port (YarpJS/YarpJS_BufferedPort_Sound) 29 October 2018, 09:42:46 UTC
0abfbd6 Adding of setStrict() to force BufferedPort to Port (YarpJS/YarpJS_BufferedPort_Sound) 19 October 2018, 13:42:33 UTC
79c66cf fix ambiguous overloaded Set(size_t) 15 October 2018, 15:55:33 UTC
607deb9 added comments to cpp code 09 December 2017, 02:34:38 UTC
05df122 added readme to simple_example 22 October 2017, 09:55:53 UTC
cd3becc added link to simple_example 22 October 2017, 09:52:23 UTC
e8e5f6e added face tracker to the list of examples 21 October 2017, 18:50:55 UTC
18b6f38 small fix to broken link 21 October 2017, 18:49:08 UTC
72a5729 added simple_example 21 October 2017, 18:47:54 UTC
67fbfe5 uploaded face tracking example 21 October 2017, 18:09:31 UTC
13b9abc updated instructions for https 21 October 2017, 17:31:47 UTC
d9361a8 Added License.md file 17 October 2017, 08:02:30 UTC
6144537 Removed the call to yarp.Network() from readme 11 October 2017, 12:29:23 UTC
1fc8cc2 added OSS licence info 11 October 2017, 08:46:32 UTC
4ae2762 fixed wrong path for send_point_cloud.js 10 October 2017, 20:56:20 UTC
839612d added zenodo DOI badge 10 October 2017, 13:35:18 UTC
92244ec made examples.js independent of run directory 09 November 2016, 23:18:33 UTC
8b4a9ef now stream video example sends click position 11 September 2016, 15:48:00 UTC
ee63744 Update README.md 11 September 2016, 07:37:36 UTC
6f2b011 fixed typo in README 11 September 2016, 07:31:39 UTC
a3ee0c6 Simplified main README file As suggeted in #12 11 September 2016, 07:30:25 UTC
2823dbc Implementation section for inertial data example 11 September 2016, 07:05:03 UTC
6661d5a small fix to speech rec README 11 September 2016, 06:43:23 UTC
9bbb00f Implementation section for speech rec example 11 September 2016, 06:37:41 UTC
3690a4e Improved examples README 11 September 2016, 05:47:39 UTC
7fca78a Added README for streaming video example 10 September 2016, 22:30:09 UTC
4d2aec5 Added README for streaming audio example 10 September 2016, 22:27:28 UTC
e1a467e Added README for inertial data example 10 September 2016, 22:23:22 UTC
a12edce Added ack to pattacini for the demo idea 10 September 2016, 22:19:50 UTC
f6cabb0 Added anchor for the README title 10 September 2016, 22:14:29 UTC
35ef3ef Created README for the point cloud example 10 September 2016, 22:13:32 UTC
1709874 relative path links in the examples README 10 September 2016, 21:59:49 UTC
54d1851 Update README.md 10 September 2016, 21:58:05 UTC
e0a45bf Improved examples README 10 September 2016, 21:50:11 UTC
4a1f03e added missing command in server setup tutorial 10 September 2016, 21:36:11 UTC
64a3e8c small fix to examples README 10 September 2016, 21:34:02 UTC
9272737 Merge branch 'master' of https://github.com/robotology/yarp.js 10 September 2016, 21:31:11 UTC
b72f498 Start re-organizing the example folder 10 September 2016, 21:30:59 UTC
67bbdbf [readme] fixed wrong link 09 September 2016, 14:13:48 UTC
48dd115 Added close functionality for ports + fixed dependency problem for opencv 09 September 2016, 11:10:54 UTC
b0c19eb added possibility to close ports locally for the browser This sped up the inertial_data example remarkably 17 August 2016, 17:12:47 UTC
a4032db small fix to README 17 August 2016, 15:32:58 UTC
730c905 Added stream video example to README 17 August 2016, 12:25:30 UTC
48ce149 Fixed memory leak with YarpJS_Image 17 August 2016, 12:18:54 UTC
c06aa57 Merge branch 'master' of https://github.com/robotology/yarp.js 17 August 2016, 08:35:07 UTC
1032d7e changed dependency to previous version of cmake-js 17 August 2016, 08:34:53 UTC
9560ada Removed dependency on global Cmake.js installation 17 August 2016, 08:29:53 UTC
8ba56e6 small fix to README 16 August 2016, 21:11:00 UTC
8ca9933 added link to node install guide 16 August 2016, 19:41:39 UTC
8720a54 added support also for Firefox 16 August 2016, 18:59:30 UTC
f6c4e6a added browser-wrapped images to README 16 August 2016, 18:49:45 UTC
d1b355c added mockup browser wrapper for example images 16 August 2016, 18:47:56 UTC
12a1244 added browser wrapper for example images 16 August 2016, 18:47:24 UTC
0aed208 added again dependency on Cmake.js 16 August 2016, 18:34:15 UTC
back to top