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

How to use the driver? #1

Open
ghost opened this issue Mar 17, 2018 · 16 comments
Open

How to use the driver? #1

ghost opened this issue Mar 17, 2018 · 16 comments

Comments

@ghost
Copy link

ghost commented Mar 17, 2018

I have a mindvision camera.when I use the driver , I get a error.

SUMMARY
========

PARAMETERS
 * /rosdistro: kinetic
 * /rosversion: 1.12.13

NODES
  /
    mv_camera_ros_node (mv_camera_ros/mv_camera_ros)

ROS_MASTER_URI=http://192.168.0.11:11311

ERROR: cannot launch node of type [mv_camera_ros/mv_camera_ros]: mv_camera_ros
ROS path [0]=/opt/ros/kinetic/share/ros
ROS path [1]=/opt/ros/kinetic/share
No processes to monitor
shutting down processing monitor...
... shutting down processing monitor complete

can you help me?
thanks

@awesomebytes
Copy link

awesomebytes commented Mar 17, 2018 via email

@vixtor-qm
Copy link
Contributor

try to build it fisrt

@ghost
Copy link
Author

ghost commented Mar 17, 2018

I compiled the package, i got error

xiluna@xiluna-MS-7996:~/catkin_ws/catkin_ws_mindvision/catkin_ws$ roslaunch mv_camera_ros mv-camera-ros.launch
... logging to /home/xiluna/.ros/log/bcf0552c-29d6-11e8-883d-4ccc6a4a9e4b/roslaunch-xiluna-MS-7996-3763.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://192.168.0.14:33308/

SUMMARY
========

PARAMETERS
 * /rosdistro: kinetic
 * /rosversion: 1.12.13

NODES
  /
    mv_camera_ros_node (mv_camera_ros/mv_camera_ros)

ROS_MASTER_URI=http://192.168.0.14:11311

process[mv_camera_ros_node-1]: started with pid [3780]
openin the camera device id 
Camera SDK init status : 0
hCamera = 1
[ERROR] [1521286350.541128971]: cv camera open failed: device_id0 cannot be opened
[mv_camera_ros_node-1] process has died [pid 3780, exit code 1, cmd /home/xiluna/catkin_ws/catkin_ws_mindvision/catkin_ws/devel/lib/mv_camera_ros/mv_camera_ros /mv_camera_ros_node/image_raw:=/image_raw __name:=mv_camera_ros_node __log:=/home/xiluna/.ros/log/bcf0552c-29d6-11e8-883d-4ccc6a4a9e4b/mv_camera_ros_node-1.log].
log file: /home/xiluna/.ros/log/bcf0552c-29d6-11e8-883d-4ccc6a4a9e4b/mv_camera_ros_node-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete
done

@vixtor-qm
Copy link
Contributor

you should launch the driver as a root due to a bug in the libMVSDK.so

@vixtor-qm
Copy link
Contributor

there is a script in the dir "scripts" named run_camera_sudo.sh take a look what it does and modify it to match your installation directory. then it should work

@awesomebytes
Copy link

Pro-tip: give the executable root ownership and add the SUID bit so you don't need to do that in the future.

# go wherever your binary is
cd your_ws/devel/bin/
sudo chown root:root mv_camera_ros
sudo chmod +s mv_camera_ros

@vixtor-qm
Copy link
Contributor

Admin tip: contact driver's support team and ask for a fix. It is not good that app gains more permissions than it actually needs. It is a security rules violation that may lead to undesired behavior.

@ghost
Copy link
Author

ghost commented Mar 17, 2018

yes! I did it .but i have a iamge

why?

@vixtor-qm
Copy link
Contributor

this is caused by the mismatch between number of image channels in the image from driver and its OpenCV wrapper. check for channel number and set it to correct value

@ghost
Copy link
Author

ghost commented Mar 18, 2018

I have succeeded!thanks~

Is this driver available on the ARM processor?

@awesomebytes
Copy link

awesomebytes commented Mar 18, 2018 via email

@ghost
Copy link
Author

ghost commented Mar 20, 2018

I find libMVSDK.so for arm . I can build it . when i run it .i got error

setting /run_id to 40d594ba-2c2f-11e8-8c61-001e0631da75
process[rosout-1]: started with pid [5337]
started core service [/rosout]
process[mv_camera_ros_node-2]: started with pid [5340]
terminate called after throwing an instance of 'std::bad_cast'
  what():  std::bad_cast
[mv_camera_ros_node-2] process has died [pid 5340, exit code -6, cmd /home/odroid/catkin_ws/catkin_mindvision/devel/lib/mv_camera_ros/mv_camera_ros /mv_camera_ros_node/image_raw:=/image_raw __name:=mv_camera_ros_node __log:=/root/.ros/log/40d594ba-2c2f-11e8-8c61-001e0631da75/mv_camera_ros_node-2.log].
log file: /root/.ros/log/40d594ba-2c2f-11e8-8c61-001e0631da75/mv_camera_ros_node-2*.log

@awesomebytes
Copy link

awesomebytes commented Mar 20, 2018 via email

@ghost
Copy link
Author

ghost commented Mar 21, 2018

Here is my debug information on the ARM platform

Cannot parse expression
warning: Probes-based dynamic linker interface failed.
[Thread debugging using libthread_db enabled]
terminate called after throwing an instance of 'std::bad_cast'
  what():  std::bad_cast

I don't know how to solve this problem

@vixtor-qm
Copy link
Contributor

camera is supplied by MindVision http://www.mindvision.com.cn/index_en.aspx. Could you please contact them and ask for fix?

@woshicaijihahahaha
Copy link

I compiled the package, i got error

xiluna@xiluna-MS-7996:~/catkin_ws/catkin_ws_mindvision/catkin_ws$ roslaunch mv_camera_ros mv-camera-ros.launch
... logging to /home/xiluna/.ros/log/bcf0552c-29d6-11e8-883d-4ccc6a4a9e4b/roslaunch-xiluna-MS-7996-3763.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://192.168.0.14:33308/

SUMMARY
========

PARAMETERS
 * /rosdistro: kinetic
 * /rosversion: 1.12.13

NODES
  /
    mv_camera_ros_node (mv_camera_ros/mv_camera_ros)

ROS_MASTER_URI=http://192.168.0.14:11311

process[mv_camera_ros_node-1]: started with pid [3780]
openin the camera device id 
Camera SDK init status : 0
hCamera = 1
[ERROR] [1521286350.541128971]: cv camera open failed: device_id0 cannot be opened
[mv_camera_ros_node-1] process has died [pid 3780, exit code 1, cmd /home/xiluna/catkin_ws/catkin_ws_mindvision/catkin_ws/devel/lib/mv_camera_ros/mv_camera_ros /mv_camera_ros_node/image_raw:=/image_raw __name:=mv_camera_ros_node __log:=/home/xiluna/.ros/log/bcf0552c-29d6-11e8-883d-4ccc6a4a9e4b/mv_camera_ros_node-1.log].
log file: /home/xiluna/.ros/log/bcf0552c-29d6-11e8-883d-4ccc6a4a9e4b/mv_camera_ros_node-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete
done

你好 请问你是如何解决这个问题的,我也遇到了这个问题

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

3 participants