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

Problems running 2 Pico Flexx at the same time. #13

Closed
piyushk opened this issue Nov 9, 2017 · 8 comments
Closed

Problems running 2 Pico Flexx at the same time. #13

piyushk opened this issue Nov 9, 2017 · 8 comments

Comments

@piyushk
Copy link
Contributor

piyushk commented Nov 9, 2017

Tested on Ubuntu 16.04 + ROS Kinetic

I'm running 2 different Pico Flexx sensors on the same machine. Individually, they work correctly, but I get a
[PicoFlexx::selectCamera] no cameras connected! from one of the nodelets when running 2 copies of the driver with correctly set sensor ids. The other one works correctly. I'm running 2 copies of the driver in 2 separate nodelet managers.

@mintar
Copy link
Collaborator

mintar commented Nov 11, 2017

Unfortunately I only have a single camera for testing, so I don't know how to debug this. Does it work if you run the 2 nodelets in the same nodelet manager?

@mintar
Copy link
Collaborator

mintar commented Nov 11, 2017

Also, is it always the second nodelet that fails, no matter which order you start them in?

@piyushk
Copy link
Contributor Author

piyushk commented Nov 16, 2017

@mintar: Thanks for the quick replies! It took me a bit to get back to testing the sensors.

Running both nodelets in the same nodelet manager worked! I've verified streaming of both pointclouds in rviz. I haven't looked at the libroyale code, but it looks like only one copy per process can grab the sensors.

There does seem to be a dynamic reconfigure setup clash, since the dynamic reconfigure servers are not currently namespaced by the nodelet itself. I still need to look into this in more detail. Some trivial attempts at remapping failed:

[ERROR] [1510846252.056941608]: Tried to advertise a service that is already advertised in this node [/robutler/pico_flexx_manager/set_parameters]

I'll leave this open for now. I'll try and figure out a fix for the reconfigure clash without without affecting backwards compatibility. If you have any suggestions for the problem, let me know!

@mintar mintar closed this as completed in 938ae77 Nov 24, 2017
mintar added a commit that referenced this issue Nov 24, 2017
Fix for dynamic reconfigure ns clash. Closes #13
@chetansarmak
Copy link

I am using Pico Flexx camera ,connected to my system with ubuntu 14.04 .It gives me following error
core service [/rosout] found
process[pico_flexx_static_tf-1]: started with pid [8510]
process[pico_flexx-2]: started with pid [8511]
process[pico_flexx_driver-3]: started with pid [8512]
[ INFO] [1519887740.596905650]: Loading nodelet /pico_flexx_driver of type pico_flexx_driver/pico_flexx_nodelet to manager pico_flexx with the following remappings:
[ INFO] [1519887740.602943459]: waitForService: Service [/pico_flexx/load_nodelet] has not been advertised, waiting...
[ INFO] [1519887740.699118144]: Initializing nodelet with 2 worker threads.
[ INFO] [1519887740.711950258]: waitForService: Service [/pico_flexx/load_nodelet] is now available.
[ INFO] [1519887740.845395789]: [PicoFlexx::initialize] parameter:
base_name: pico_flexx
sensor: default
use_case: 0
automatic_exposure: true
automatic_exposure_stream2: true
exposure_time: 1000
exposure_time_stream2: 1000
max_noise: 0.07 meters
range_factor: 2
queue_size: 5
base_name_tf: pico_flexx
[ INFO] [1519887740.845530122]: [PicoFlexx::initialize] libroyale version: 3.12.0.44
[ERROR] [1519887740.854464419]: [PicoFlexx::selectCamera] no cameras connected!

But the camera is connected and shows when i give dmesg command also

where am i going wrong ? and I am using Tegra board.
Thanks in advance

@mintar
Copy link
Collaborator

mintar commented Mar 1, 2018

@chetansarmak That's a different problem than the one in this issue. Please open a new issue for this.

@raabuchanan
Copy link

Hello,

I am experiencing this exact issue. If I try to run 2 different node managers each for a different pico_flexx then the first one will connect but the second will fail to run. I'm working around it by running each sensor under the same node manager. I'm using Ubuntu 16.06 + ROS Kinetic with the latest driver on master branch and SDK 3.15.0.50

@mintar
Copy link
Collaborator

mintar commented Apr 16, 2018

I don't have two pico flexx cameras for testing, so I'm afraid I can't help fixing this. According to the comments by @piyushk , this seems to be a limitation of libroyale, so there's little we can do anyway. Also note that running both nodelets in the same nodelet manager works around the problem. If you still absolutely have to run the nodelets in separate nodelet managers, I guess you'll have to follow up with PMD directly and ask how to access two cameras from two separate processes on the same PC.

Please let me know if you find out more.

mintar added a commit that referenced this issue Apr 16, 2018
@vladlanda
Copy link

vladlanda commented Apr 30, 2018

To overcame [PicoFlexx::selectCamera] no cameras connected! problem, add your user to 'plugdev' group.

In terminal type :
sudo adduser <-username-> plugdev

The pico flexx camera uses 'plugdev' group for administration privilege.

pmd camera udev rules readme :

"This directory contains udev-rules files.
See https://wiki.debian.org/udev for explanation how
udev rules work.
If you are using ubuntu, copy the .rules file to
/etc/udev/rules.d/ to use pmd devices without administrative
privileges (you will need root rights once to copy the file
to the destination):
sudo cp 10-royale-ubuntu.rules /etc/udev/rules.d
Please make sure that the user is in the group plugdev!
After copying the udev rule, please unplug and reinsert the camera."

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

5 participants