## For instruction on writing tutorials ## http://www.ros.org/wiki/WritingTutorials #################################### ##FILL ME IN #################################### ## for a custom note with links: ## note = ## for the canned note of "This tutorial assumes that you have completed the previous tutorials:" just add the links ## note.0= ## descriptive title for the tutorial ## title = Download and install swissranger_camera ## multi-line description to be displayed in search ## description = This tutorial guides you through the process of downloading and installing all the software needed to run your Swissranger 3D Camera. ## the next tutorial description (optional) ## next = ## links to next tutorial (optional) ## next.0.link= ## next.1.link= ## what level user is this tutorial for ## level= BeginnerCategory ## keywords = Swissranger, 3D camera, SR4000, SR3000, udev rules #################################### <> <> === Download and install libmesasr === First of all you need to go to [[http://www.mesa-imaging.ch/|Mesa Imaging]] and download libmesasr since swissranger_camera depends on it to compile and work properly. Go to http://www.mesa-imaging.ch/drivers.php and download the deb package for your architecture under Swissranger Linux Drivers. At the time this tutorial was written the available drivers were: * [[http://www.mesa-imaging.ch/dlm.php?fname=./customer/driver/libmesasr-dev-1.0.14-653.i386.deb|libmesasr-dev-1.0.14-653.i386.deb]] * [[http://www.mesa-imaging.ch/dlm.php?fname=./customer/driver/libmesasr-dev-1.0.14-653.amd64.deb|libmesasr-dev-1.0.14-653.amd64.deb]] After libmesasr finishes downloading install it. === Download swissranger_camera === Open a terminal window and cd into a directory that is on your [[http://www.ros.org/wiki/ROS/EnvironmentVariables#ROS_PACKAGE_PATH|ROS_PACKAGE_PATH]]. Now you'll checkout the stack containing swissranger_camera using svn. In your terminal window run the following: {{{ svn co https://code.ros.org/svn/ros-pkg/branches/trunk_cturtle/stacks/camera_drivers_experimental }}} Now all you need to do is rosmake swissranger_camera. If libmesasr was properly installed it should go smoothly. {{{ rosmake swissranger_camera }}} === Add udev rules === If you try to connect your Swissranger camera to your computer and run swissranger_camera and you get the following error... {{{ [ERROR] 1279202609.670480000: Exception thrown while connecting to the camera: [SR::open]: Failed to open device!" }}} ...then you need to edit your udev rules: {{{ sudo gedit /etc/udev/rules.d/46-mesa.rules }}} You should see something like this: {{{ BUS!="usb", SUBSYSTEM!=="usb_device", ACTION!="add", GOTO="kcontrol_rules_end" #Swissranger SR3k(old),SR3k,SR4k SYSFS{idVendor}=="0852", SYSFS{idProduct}=="0074", MODE="666", GROUP="usb" SYSFS{idVendor}=="1ad2", SYSFS{idProduct}=="0074", MODE="666", GROUP="usb" SYSFS{idVendor}=="1ad2", SYSFS{idProduct}=="0075", MODE="666", GROUP="usb" LABEL="kcontrol_rules_end" }}} All you have to do is add some extra lines and your file should end up looking like this: {{{ BUS!="usb", SUBSYSTEM!=="usb_device", ACTION!="add", GOTO="kcontrol_rules_end" #Swissranger SR3k(old),SR3k,SR4k SYSFS{idVendor}=="0852", SYSFS{idProduct}=="0074", MODE="666", GROUP="usb" SYSFS{idVendor}=="1ad2", SYSFS{idProduct}=="0074", MODE="666", GROUP="usb" SYSFS{idVendor}=="1ad2", SYSFS{idProduct}=="0075", MODE="666", GROUP="usb" SUBSYSTEM=="usb", ACTION=="add", SYSFS{idVendor}=="0852", SYSFS{idProduct}=="0074", MODE="660", GROUP="plugdev" SUBSYSTEM=="usb", ACTION=="add", SYSFS{idVendor}=="1ad2", SYSFS{idProduct}=="0074", MODE="660", GROUP="plugdev" SUBSYSTEM=="usb", ACTION=="add", SYSFS{idVendor}=="1ad2", SYSFS{idProduct}=="0075", MODE="660", GROUP="plugdev" LABEL="kcontrol_rules_end" }}} Save and close the file. Plug your Swissranger camera to your computer and start swissranger_camera: {{{ rosrun swissranger_camera swissranger_camera }}} Congratulations! You have successfully interfaced your Swissranger camera with ROS! You can start [[rviz]] to take a look at what it is publishing. === Credits === Thanks to David Dröschel for sharing how to change the udev rules. ## AUTOGENERATED DO NOT DELETE ## TutorialCategory ## FILL IN THE STACK TUTORIAL CATEGORY HERE