Code Monkey home page Code Monkey logo

Comments (50)

giacomodabisias avatar giacomodabisias commented on July 2, 2024

Thanks,
What is the problem?
Il 25/Feb/2016 09:05, "moonsh" [email protected] ha scritto:

Hello

First of all, thank you for sharing your hard work.

I am doing study using multi kinects . By the way, I got a question.

I have succeeded using a single kinect but I have faced problem to set the
second kinect.

It wasn't work properly.


Reply to this email directly or view it on GitHub
#14.

from libfreenect2pclgrabber.

moonsh avatar moonsh commented on July 2, 2024

Is Libfreenect2Pclgrapper possible to apply to multi Kinects ?? I have faced a error when I try use two kinects .

And I have one more question.

The values x,y and z which I got using PCL are same as output of Libfreenect2 data ?

from libfreenect2pclgrabber.

giacomodabisias avatar giacomodabisias commented on July 2, 2024

Hi.
Yes. What is the error message?
Yes
Il 25/Feb/2016 11:21 AM, "moonsh" [email protected] ha scritto:

Is it possible to apply to multi Kinects ?? I have faced a error when I
try use two kinects .

And I have one more question.

The values x,y and z which I got using PCL are same as output of
Libfreenect2 data ?


Reply to this email directly or view it on GitHub
#14 (comment)
.

from libfreenect2pclgrabber.

moonsh avatar moonsh commented on July 2, 2024

Sorry for not detail explanation.

I just declared second K2G class for second Kinect .
K2G k2g(freenectprocessor , 0);
K2G k2g2(freenectprocessor, 1);
0 is Frist kinect, 1 is Second kinect

and then I declared second cloud like this.
boost::shared_ptrpcl::PointCloudpcl::PointXYZRGB cloud2;

and then I followed existing coding .

This coding is building well but exe doesn't work

I think there must be something more I need to declare.

from libfreenect2pclgrabber.

giacomodabisias avatar giacomodabisias commented on July 2, 2024

Exe? Are you on windows?
Il 25/Feb/2016 11:42, "moonsh" [email protected] ha scritto:

Sorry for not detail explanation.

I just declared second K2G class for second Kinect .
K2G k2g(freenectprocessor , 0);
K2G k2g2(freenectprocessor, 1);
0 is Frist kinect, 1 is Second kinect

and then I declared second cloud like this.
boost::shared_ptrpcl::PointCloudpcl::PointXYZRGB cloud2;

and then I followed existing coding .

This coding is building well but exe doesn't work

I think there must be something more I need to declare.


Reply to this email directly or view it on GitHub
#14 (comment)
.

from libfreenect2pclgrabber.

moonsh avatar moonsh commented on July 2, 2024

Yes windows I used visual studio

from libfreenect2pclgrabber.

giacomodabisias avatar giacomodabisias commented on July 2, 2024

If you want to open two kinects you have to open them by serial id. I have
to add that, I forgot.
Have a look at this code on how to do it. I will add that feature later
today if you want to wait for it

2016-02-25 11:45 GMT+01:00 moonsh [email protected]:

Yes windows I used visual studio


Reply to this email directly or view it on GitHub
#14 (comment)
.

Ing G. Dabisias, PhD Student
Percro Lab, (Laboratory of Perceptual Robotics)
Scuola Superiore Sant'Anna
via Luigi Alamanni 13D, San Giuliano Terme 56010 (PI), Italy
mob.: +39 3480839095
skype: giacomo.dabisias2

from libfreenect2pclgrabber.

moonsh avatar moonsh commented on July 2, 2024

Thank you.

Is this right approach ?

K2G k2g(freenectprocessor , 0);
K2G k2g2(freenectprocessor, 1);
0 is Frist kinect, 1 is Second kinect

K2G(processor p, int snumber, bool mirror = false): mirror_(mirror), listener_(libfreenect2::Frame::Color | libfreenect2::Frame::Ir | libfreenect2::Frame::Depth),
undistorted_(512, 424, 4), registered_(512, 424, 4), big_mat_(1920, 1082, 4), qnan_(std::numeric_limits::quiet_NaN())

serial_ = freenect2_.getDeviceSerialNumber(snumber);

from libfreenect2pclgrabber.

giacomodabisias avatar giacomodabisias commented on July 2, 2024

no, that value is mirroring as stated.

2016-02-25 12:58 GMT+01:00 moonsh [email protected]:

Is this right approach ?

K2G k2g(freenectprocessor , 0);
K2G k2g2(freenectprocessor, 1);
0 is Frist kinect, 1 is Second kinect

K2G(processor p, int snumber, bool mirror = false): mirror_(mirror),
listener_(libfreenect2::Frame::Color | libfreenect2::Frame::Ir |
libfreenect2::Frame::Depth),
undistorted_(512, 424, 4), registered_(512, 424, 4), big_mat_(1920, 1082,
4), qnan_(std::numeric_limits::quiet_NaN())

serial_ = freenect2_.getDeviceSerialNumber(snumber);


Reply to this email directly or view it on GitHub
#14 (comment)
.

Ing G. Dabisias, PhD Student
Percro Lab, (Laboratory of Perceptual Robotics)
Scuola Superiore Sant'Anna
via Luigi Alamanni 13D, San Giuliano Terme 56010 (PI), Italy
mob.: +39 3480839095
skype: giacomo.dabisias2

from libfreenect2pclgrabber.

giacomodabisias avatar giacomodabisias commented on July 2, 2024

Now you should be able to use multiple kinect2 by pulling the last version. You need to pass as first parameter the processor, second if you want mirroring and third a string with the serial number od the device

from libfreenect2pclgrabber.

moonsh avatar moonsh commented on July 2, 2024

Firstly, Thanks a lot.

Sorry for keep asking

I tried selecting Kinect but it said there is declaration error

I did like below to select 502394541942(kinect serial number) without mirroring but it seems there is mistake.

K2G k2g(freenectprocessor, false, 502394541942);

and I am curious what mirroring means .

from libfreenect2pclgrabber.

giacomodabisias avatar giacomodabisias commented on July 2, 2024

You have to do a git pull

from libfreenect2pclgrabber.

moonsh avatar moonsh commented on July 2, 2024

I downloaded latest version

from libfreenect2pclgrabber.

giacomodabisias avatar giacomodabisias commented on July 2, 2024

So what is the exact error?

from libfreenect2pclgrabber.

moonsh avatar moonsh commented on July 2, 2024

K2G k2g(freenectprocessor, false, 502394541942);

Error : Parameter types should be (processor, bool, double double )

I think 502394541942 causes problem.

from libfreenect2pclgrabber.

giacomodabisias avatar giacomodabisias commented on July 2, 2024

Yeah, the last parameter should be passed as string which is more generic so do:
K2G k2g(freenectprocessor, false, "502394541942");

from libfreenect2pclgrabber.

moonsh avatar moonsh commented on July 2, 2024

Ah thank you very much. It was a silly question.

By the way , what does mirroring mean ?

from libfreenect2pclgrabber.

giacomodabisias avatar giacomodabisias commented on July 2, 2024

it flips depth and color

from libfreenect2pclgrabber.

moonsh avatar moonsh commented on July 2, 2024

Thanks a lot . I will close this issue

from libfreenect2pclgrabber.

moonsh avatar moonsh commented on July 2, 2024

It works well but frame speed is getting slower and slower..

Is there any way to get good frame speed ?

from libfreenect2pclgrabber.

giacomodabisias avatar giacomodabisias commented on July 2, 2024

Ok so both kinect work at the same time right? Could you check if memory consumption of the executable is constant or growing? could be a memory leak

from libfreenect2pclgrabber.

moonsh avatar moonsh commented on July 2, 2024

Yes right , There is no growing memory and cpu. They are constant.

Maybe this speed is maximum ?

from libfreenect2pclgrabber.

giacomodabisias avatar giacomodabisias commented on July 2, 2024

I will test it and let you know; just got a second kinect2

from libfreenect2pclgrabber.

giacomodabisias avatar giacomodabisias commented on July 2, 2024

I am getting
[Error] [protocol::CommandTransaction] bulk transfer failed: LIBUSB_ERROR_IO Input/Output Error

Ah found a solution
OpenKinect/libfreenect2#97

from libfreenect2pclgrabber.

giacomodabisias avatar giacomodabisias commented on July 2, 2024

Works if you show all in the same viewer. Its a vtk problem with multiple viewers

from libfreenect2pclgrabber.

giacomodabisias avatar giacomodabisias commented on July 2, 2024

I uploaded an example working with multiple kinects

from libfreenect2pclgrabber.

moonsh avatar moonsh commented on July 2, 2024

I am sorry to ask you again

I tried example and computer tells it isn't executable even if all in the same viewer

from libfreenect2pclgrabber.

giacomodabisias avatar giacomodabisias commented on July 2, 2024

SOrry I can't understand the problem. Could you reformulate?

from libfreenect2pclgrabber.

moonsh avatar moonsh commented on July 2, 2024

I just tried your multiple kinects example but it doesn't work.

There is no error during compile but it is not executable.

from libfreenect2pclgrabber.

giacomodabisias avatar giacomodabisias commented on July 2, 2024

What is the error and what arguments are you passing to the executable?

from libfreenect2pclgrabber.

moonsh avatar moonsh commented on July 2, 2024

Error message : It is not executable because there is problem. I used your code like below

boost::shared_ptrpcl::PointCloudpcl::PointXYZRGB cloud_1;
boost::shared_ptrpcl::PointCloudpcl::PointXYZRGB cloud_2;
K2G k2g_1(freenectprocessor, argc == 5 ? true : false, argv[2]);
K2G k2g_2(freenectprocessor, argc == 5 ? true : false, argv[3]);

std::cout << "getting cloud" << std::endl;
cloud_1 = k2g_1.getCloud();
cloud_2 = k2g_2.getCloud();

cloud_1->sensor_orientation_.w() = 0.0;
cloud_1->sensor_orientation_.x() = 1.0;
cloud_1->sensor_orientation_.y() = 0.0;
cloud_1->sensor_orientation_.z() = 0.0;

cloud_2->sensor_orientation_.w() = 0.0;
cloud_2->sensor_orientation_.x() = 1.0;
cloud_2->sensor_orientation_.y() = 0.0;
cloud_2->sensor_orientation_.z() = 0.0;

from libfreenect2pclgrabber.

giacomodabisias avatar giacomodabisias commented on July 2, 2024

what arguments are you passing to the executable? can you write the exact execution line?

from libfreenect2pclgrabber.

moonsh avatar moonsh commented on July 2, 2024

sorry for late reply

I wrote like this

MultKinect2Grabber.exe 51169242542 502394541942

from libfreenect2pclgrabber.

giacomodabisias avatar giacomodabisias commented on July 2, 2024

Are you on windows? Did you build again the multi_test?

from libfreenect2pclgrabber.

moonsh avatar moonsh commented on July 2, 2024

Yes I am using Windows

Yes I built again

from libfreenect2pclgrabber.

giacomodabisias avatar giacomodabisias commented on July 2, 2024

The grabber was developed for Linux so I am not sure where the problem could be.
Is the single grabber working?
The arguments have to be "processor serial1 serial2" so try to execute it using the correct arguments.
0,1,2,3 correspond to CPU, OPENCL, OPENGL, CUDA

from libfreenect2pclgrabber.

moonsh avatar moonsh commented on July 2, 2024

Ah I see.

Yes single grabber is working well

I wrote this but this one also doesn't work.
"processor serial1 serial2"

from libfreenect2pclgrabber.

giacomodabisias avatar giacomodabisias commented on July 2, 2024

You have to write MultKinect2Grabber.exe 0 51169242542 502394541942

from libfreenect2pclgrabber.

moonsh avatar moonsh commented on July 2, 2024

Ah yes I already tried like that
MultKinect2Grabber.exe 0 51169242542 502394541942

It doesn't work

from libfreenect2pclgrabber.

giacomodabisias avatar giacomodabisias commented on July 2, 2024

and the error is still the same?

from libfreenect2pclgrabber.

moonsh avatar moonsh commented on July 2, 2024

Yes same

from libfreenect2pclgrabber.

giacomodabisias avatar giacomodabisias commented on July 2, 2024

No idea, its a Windows or build error.

from libfreenect2pclgrabber.

jiaojialulu avatar jiaojialulu commented on July 2, 2024

I succeed on windows.
First of all to ensure that you can use two kinects.
And I can only run this code in release mode.
Then you should set "Stack Reserve Size" of the project to a big number ,I set 999999.

from libfreenect2pclgrabber.

giacomodabisias avatar giacomodabisias commented on July 2, 2024

Great to hear that! :)

from libfreenect2pclgrabber.

 avatar commented on July 2, 2024

Hi, how to declare two kinect.
K2G k2g(freenectprocessor, 0,"875561444447");
K2G k2g(freenectprocessor, 1,"543402634447");
This declare doesn't work, or where to specify at least processor and one serial?
Thanks.

from libfreenect2pclgrabber.

giacomodabisias avatar giacomodabisias commented on July 2, 2024

Hi, you are declaring twice the same variable

from libfreenect2pclgrabber.

 avatar commented on July 2, 2024

Thanks for answer.
Change on two type variable:

K2G k2g(freenectprocessor, 0,"875561444447");
 K2G k2g2(freenectprocessor, 1,"543402634447");
  std::cout << "getting cloud" << std::endl;
  cloud = k2g.getCloud();
cloud = k2g2.getCloud(); 

results:

[Info] [Freenect2DeviceImpl] opening...
[Info] [Freenect2DeviceImpl] transfer pool sizes rgb: 2016384 ir: 608*33792
[Info] [Freenect2DeviceImpl] opened
[Info] [Freenect2DeviceImpl] starting...
[Error] [protocol::CommandTransaction] bulk transfer failed: LIBUSB_ERROR_IO Input/Output Error
getting cloud
[Info] [OpenGLDepthPacketProcessor] avg. time: 19.2322ms -> ~51.9961Hz
[Info] [VaapiRgbPacketProcessor] avg. time: 9.22728ms -> ~108.374Hz

I think this is my fault because im using test.cpp. How to use code in Multi_test.cpp? How to specify least processor and one serial?
I would be very grateful for your help.
Thanks

from libfreenect2pclgrabber.

giacomodabisias avatar giacomodabisias commented on July 2, 2024

Just use the MultiKinect2Grabber binary which you cna build from the cmake

from libfreenect2pclgrabber.

 avatar commented on July 2, 2024

In Multiple i got error.

Syntax is: ./MultiKinect2Grabber [-processor 0|1|2] -processor options 0,1,2,3 correspond to CPU, OPENCL, OPENGL, CUDA respectively
followed by the kinect2 serials and a last 1 for mirroring
Press 's' to store both clouds and color images.
Press 'x' to store both calibrations.
Wrong syntax! specify at least processor and one serial: 1
What to do "argc"?

from libfreenect2pclgrabber.

giacomodabisias avatar giacomodabisias commented on July 2, 2024

/MultiKinect2Grabber [-processor 0|1|2] -processor options 0,1,2,3 correspond to CPU, OPENCL, OPENGL, CUDA respectively
this is telling you what to run. What are you running?

from libfreenect2pclgrabber.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.