Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example application XML not working #47

Open
giotherobot opened this issue Jun 11, 2024 · 4 comments
Open

Example application XML not working #47

giotherobot opened this issue Jun 11, 2024 · 4 comments

Comments

@giotherobot
Copy link
Member

The example in the README.md seems to not be updated:

yarprobotinterface --config realsense.xml
[ERROR] |yarp.os.Property| cannot read from yarprobotinterface.ini
[DEBUG] Reading file /home/giovannif/yarp-device-realsense2/realsense.xml
[ERROR] DTD V1.x has been deprecated. Please update your configuration files to DTD v3.x
[ERROR] Invalid DTD version, execution stopped.
[FATAL] Config file  /home/giovannif/yarp-device-realsense2/realsense.xml  not parsed correctly.
Trace requested at /home/giovannif/robotology-superbuild/src/YARP/src/yarprobotinterface/Module.cpp:132 by code called from:
/home/giovannif/robotology-superbuild/build/install/bin/../lib/libYARP_os.so.3(_Z16yarp_print_traceP8_IO_FILEPKcj+0x36) [0x71cc23e309b6]
yarprobotinterface(+0x8208) [0x5b97d328e208]
yarprobotinterface(+0x9f12) [0x5b97d328ff12]
/home/giovannif/robotology-superbuild/build/install/bin/../lib/libYARP_os.so.3(_ZN4yarp2os8RFModule9runModuleERNS0_14ResourceFinderE+0xd7) [0x71cc23e88a97]
yarprobotinterface(+0x7a6d) [0x5b97d328da6d]
/lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x71cc23829d90]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80) [0x71cc23829e40]
yarprobotinterface(+0x7b40) [0x5b97d328db40]

Yarp version: YARP version 3.9.0+14-20240603.1+git169ae4656
Building from superbuild, librealsense installed via conda.

@giotherobot
Copy link
Member Author

For the DTD version I found this related comment:

robotology-legacy/codyco-modules#276 (comment)

Adding <!DOCTYPE robot PUBLIC "-//YARP//DTD yarprobotinterface 3.0//EN" "http://www.yarp.it/DTD/yarprobotinterfaceV3.0.dtd"> allows the parsing to continue but then I get:

yarprobotinterface --config realsense.xml
[ERROR] |yarp.os.Property| cannot read from yarprobotinterface.ini
[DEBUG] Reading file /home/giovannif/yarp-device-realsense2/realsense.xml
[DEBUG] yarprobotinterface: using xml parser for DTD v3.x
[DEBUG] Reading file /home/giovannif/yarp-device-realsense2/realsense.xml
[INFO] Yarprobotinterface was started using the following enable_tags: 
[INFO] Yarprobotinterface was started using the following disable_tags: 
[DEBUG] List of all enable attributes found in the include tags: 
[DEBUG] List of all disable attributes found in the include tags: 
[DEBUG] Preprocessor complete in:  1.43051e-06 s
[ERROR] Syntax error while loading  at line 2 . Root element should be "robot". Found application
[FATAL] Config file  /home/giovannif/yarp-device-realsense2/realsense.xml  not parsed correctly.
Trace requested at /home/giovannif/robotology-superbuild/src/YARP/src/yarprobotinterface/Module.cpp:132 by code called from:
/home/giovannif/robotology-superbuild/build/install/bin/../lib/libYARP_os.so.3(_Z16yarp_print_traceP8_IO_FILEPKcj+0x36) [0x74de84b2c9b6]
yarprobotinterface(+0x8208) [0x6451d3272208]
yarprobotinterface(+0x9f12) [0x6451d3273f12]
/home/giovannif/robotology-superbuild/build/install/bin/../lib/libYARP_os.so.3(_ZN4yarp2os8RFModule9runModuleERNS0_14ResourceFinderE+0xd7) [0x74de84b84a97]
yarprobotinterface(+0x7a6d) [0x6451d3271a6d]
/lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x74de84629d90]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80) [0x74de84629e40]
yarprobotinterface(+0x7b40) [0x6451d3271b40]

which I guess is reasonable.

@giotherobot
Copy link
Member Author

Trying to switch from robot to application returns:

yarprobotinterface --config realsense.xml
[ERROR] |yarp.os.Property| cannot read from yarprobotinterface.ini
[DEBUG] Reading file /home/giovannif/yarp-device-realsense2/realsense.xml
[WARNING] Invalid syntax while loading /home/giovannif/yarp-device-realsense2/realsense.xml at line 1 . Unknown document type. Supported document types are: "robot", "devices", "params"
[WARNING] Invalid syntax while loading /home/giovannif/yarp-device-realsense2/realsense.xml at line 1 . No DTD found. Assuming version yarprobotinterfaceV3.0
[ERROR] DTD V1.x has been deprecated. Please update your configuration files to DTD v3.x
[ERROR] Invalid DTD version, execution stopped.
[FATAL] Config file  /home/giovannif/yarp-device-realsense2/realsense.xml  not parsed correctly.
Trace requested at /home/giovannif/robotology-superbuild/src/YARP/src/yarprobotinterface/Module.cpp:132 by code called from:
/home/giovannif/robotology-superbuild/build/install/bin/../lib/libYARP_os.so.3(_Z16yarp_print_traceP8_IO_FILEPKcj+0x36) [0x7dcb681ac9b6]
yarprobotinterface(+0x8208) [0x641021174208]
yarprobotinterface(+0x9f12) [0x641021175f12]
/home/giovannif/robotology-superbuild/build/install/bin/../lib/libYARP_os.so.3(_ZN4yarp2os8RFModule9runModuleERNS0_14ResourceFinderE+0xd7) [0x7dcb68204a97]
yarprobotinterface(+0x7a6d) [0x641021173a6d]
/lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x7dcb67c29d90]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80) [0x7dcb67c29e40]
yarprobotinterface(+0x7b40) [0x641021173b40]

@giotherobot
Copy link
Member Author

I was confused between a yarpmanager configuration file and a yarprobotinterface one.

Opening the file from the yarpmanager works, but then the command yarpdev --from RealSense_conf.ini does not work.

Testing the same command on the command line shows:

yarpdev --from RealSense_conf.ini 
[ERROR] |yarp.os.YarpPluginSettings| Cannot find "RGBDSensorWrapper" plugin (not built in, and no .ini file found for it)Check that YARP_DATA_DIRS leads to at least one directory with plugins/RGBDSensorWrapper.ini or share/yarp/plugins/RGBDSensorWrapper.ini in it
[ERROR] |yarp.dev.PolyDriver|RGBDSensorWrapper| Could not find device <RGBDSensorWrapper>
[DEBUG] |yarp.dev.Drivers|RGBDSensorWrapper| ===============================================================
[DEBUG] |yarp.dev.Drivers|RGBDSensorWrapper| == Options checked by device:
[DEBUG] |yarp.dev.Drivers|RGBDSensorWrapper| ==
[DEBUG] |yarp.dev.Drivers|RGBDSensorWrapper| device=RGBDSensorWrapper
[DEBUG] |yarp.dev.Drivers|RGBDSensorWrapper| id [RGBDSensorWrapper]
[DEBUG] |yarp.dev.Drivers|RGBDSensorWrapper|     Id assigned to this device
[DEBUG] |yarp.dev.Drivers|RGBDSensorWrapper| ==
[DEBUG] |yarp.dev.Drivers|RGBDSensorWrapper| ===============================================================
[ERROR] |yarp.dev.Drivers|RGBDSensorWrapper| yarpdev: ***ERROR*** device not available.
[INFO] |yarp.dev.Drivers|RGBDSensorWrapper| Suggestions:
[INFO] |yarp.dev.Drivers|RGBDSensorWrapper| + Do "yarpdev --list" to see list of supported devices.

Checking some working configuration files from the robots with @traversaro we found out that the RGBDSensorWrapper was renamed to rgbdSensor_nws_yarp at some point. So with thhis file:

device       rgbdSensor_nws_yarp
subdevice    realsense2
name         /depthCamera

[SETTINGS]
depthResolution (480 270)    #Other possible values (424 240) or (640 480)
rgbResolution   (424 240)	 #Other possible values (424 240) or (640 480)
framerate       30
enableEmitter   true
needAlignment   true
alignmentFrame  RGB

[HW_DESCRIPTION]
clipPlanes (0.2 10.0)

the command yarpdev --from RealSense_conf.ini starts.

I am still unable to see the images in the yarpview though.

@giotherobot
Copy link
Member Author

In the end I had to install some packages on apt, following:

https://github.com/IntelRealSense/librealsense/blob/development/doc/distribution_linux.md#installing-the-packages

installing only the dkms and utils pacakges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant