# ROS node for the Raspberry Pi Camera Module

**URL:** <https://forum.ubiquityrobotics.com/t/ros-node-for-the-raspberry-pi-camera-module/137>\
**Category:** General Questions\
**Created:** [August 28, 2018, 3:48pm UTC](https://forum.ubiquityrobotics.com/t/ros-node-for-the-raspberry-pi-camera-module/137 "2018-08-28T15:48:05Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Max](https://forum.ubiquityrobotics.com/letter_avatar_proxy/v4/letter/m/e5b9ba/32.png) [@Max](https://forum.ubiquityrobotics.com/u/Max)\
**Post date:** [August 28, 2018, 3:48pm UTC](https://forum.ubiquityrobotics.com/t/ros-node-for-the-raspberry-pi-camera-module/137/1 "2018-08-28T15:48:05Z")

</div>

Hi,  
I followed the tutorial

> **[GitHub - UbiquityRobotics/raspicam\_node: ROS node for camera module of Raspberry Pi](https://github.com/UbiquityRobotics/raspicam_node)**
>
> ROS node for camera module of Raspberry Pi

working with Ubuntu 16.04 and ROS kinetic  
camera module V2.  
could you please help me with my problem.  
in fiducials rviz  
when I choose image topic as /fiducial\_images (in order to  
detect the fiducial markers, the image field says (no image  
received)  
if I change the image topic to /raspicam\_node/image  
it will work but the is no detection.  
please help.  
thanks

---

<div class="post-metadata">

**Author:** ![rohbotics](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/rohbotics/32/222_2.png) [@rohbotics](https://forum.ubiquityrobotics.com/u/rohbotics)\
**Post date:** [August 28, 2018, 11:26pm UTC](https://forum.ubiquityrobotics.com/t/ros-node-for-the-raspberry-pi-camera-module/137/2 "2018-08-28T23:26:16Z")

</div>

Raspicam will only publish the images themselves.

For detection you need `aruco_detect` and the `roslaunch aruco_detect aruco_dectect.launch`command

Rohan

---

<div class="post-metadata">

**Author:** ![Max](https://forum.ubiquityrobotics.com/letter_avatar_proxy/v4/letter/m/e5b9ba/32.png) [@Max](https://forum.ubiquityrobotics.com/u/Max)\
**Post date:** [August 29, 2018, 1:11pm UTC](https://forum.ubiquityrobotics.com/t/ros-node-for-the-raspberry-pi-camera-module/137/3 "2018-08-29T13:11:20Z")

</div>

Hi Rohan,

Many thanks for your clarification.  
I am trying to detect the aruco marker using the raspi itself without the need to connect it to pc with ubuntu and ros for further processing.  
can I install the aruco marker in the raspi as well. because its important for me to use the raspi and its camera for detection and then only send the position of the detected marker to a pc.  
thank again for your help.

---

<div class="post-metadata">

**Author:** ![rohbotics](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/rohbotics/32/222_2.png) [@rohbotics](https://forum.ubiquityrobotics.com/u/rohbotics)\
**Post date:** [August 29, 2018, 3:20pm UTC](https://forum.ubiquityrobotics.com/t/ros-node-for-the-raspberry-pi-camera-module/137/4 "2018-08-29T15:20:44Z")

</div>

You can run aruco on the raspberry pi, this is the primary way that we run it.

Rohan

---

<div class="post-metadata">

**Author:** ![davecrawley](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/davecrawley/32/24_2.png) [@davecrawley](https://forum.ubiquityrobotics.com/u/davecrawley)\
**Post date:** [August 29, 2018, 3:43pm UTC](https://forum.ubiquityrobotics.com/t/ros-node-for-the-raspberry-pi-camera-module/137/5 "2018-08-29T15:43:24Z")

</div>

@Max all this software (including the aruco marker software) is included on our standard raspberry pi distribution which is available here:

[downloads.ubiquityrobotics.com](http://downloads.ubiquityrobotics.com)

All you need to do is download our image and burn it on to a suitable SD card (a high speed 16GB card is recommended).

---

<div class="post-metadata">

**Author:** ![Max](https://forum.ubiquityrobotics.com/letter_avatar_proxy/v4/letter/m/e5b9ba/32.png) [@Max](https://forum.ubiquityrobotics.com/u/Max)\
**Post date:** [August 30, 2018, 10:37am UTC](https://forum.ubiquityrobotics.com/t/ros-node-for-the-raspberry-pi-camera-module/137/6 "2018-08-30T10:37:10Z")

</div>

Thanks to both of you guys,

I got the idea but still not working for me.  
BTW, I have downloaded your distribution as davecrawley said.  
What I am doing is the following, please correct me if I am wrong:

First there is no need to run roscore because for some reasons its already running  
Second, I run the camera topic :  
roslaunch raspicam\_node camerav2\_1280x960.launch

Third, I run the aruco marker:  
roslaunch aruco\_detect aruco\_detect.launch

Forth, I run: rviz  
in order to visualize the process of detecting but in the left side panel i got  
Fixed frame : No tf data. Actual error: Fixed Frame [map] does not exist

Am I doing the right thing?  
Please help.  
Many thanks.

---

<div class="post-metadata">

**Author:** ![brunolfm](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/brunolfm/32/42_2.png) [@brunolfm](https://forum.ubiquityrobotics.com/u/brunolfm)\
**Post date:** [August 30, 2018, 10:50am UTC](https://forum.ubiquityrobotics.com/t/ros-node-for-the-raspberry-pi-camera-module/137/7 "2018-08-30T10:50:49Z")

</div>

Max ill try to help you, but im not sure that this is what you need…

Try this steps 1 by 1:

Open 2 terminals ssh´ed to robot and 1 on VM:

1st terminal on robot run - [roslaunch magni\_nav move\_basic.launch]  
2nd terminal on robot run - [roslaunch magni\_nav aruco.launch]  
3rd terminal on VM run - [roslaunch magni\_viz view\_nav.launch]

---

<div class="post-metadata">

**Author:** ![Max](https://forum.ubiquityrobotics.com/letter_avatar_proxy/v4/letter/m/e5b9ba/32.png) [@Max](https://forum.ubiquityrobotics.com/u/Max)\
**Post date:** [August 30, 2018, 5:14pm UTC](https://forum.ubiquityrobotics.com/t/ros-node-for-the-raspberry-pi-camera-module/137/8 "2018-08-30T17:14:45Z")

</div>

Hi,  
@rohbotics @davecrawley @brunolfm

At the mean time I am not using magni robot.  
I just want to discover the aruco marker using the raspi and its camera. I installed your latest distribution on my sd card and I am doing everything inside the raspi

I got access to the camera as you can see in the following fig

 ![IMG-0938](https://frm.ubiquityrobotics.com/uploads/default/original/1X/81fd67e0b55b741cd03bc574455753d18344fa16.jpeg)

but when I try to open the camera from fiducial\_images topic, it simply do not work as you can see in the following fig.

 ![IMG-0939](https://frm.ubiquityrobotics.com/uploads/default/original/1X/1da023c66281d538ac3629d77c4803ab7706c39c.jpeg)

when I connected the raspi to a laptop and open rviz from the laptop it also did not work.

the camera node is fine but the aruco detect is not working

I am using three topics: the camera node, the aruco\_detect and rviz

Any help is highly appreciated.

many thanks

---

<div class="post-metadata">

**Author:** ![davecrawley](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/davecrawley/32/24_2.png) [@davecrawley](https://forum.ubiquityrobotics.com/u/davecrawley)\
**Post date:** [August 30, 2018, 6:16pm UTC](https://forum.ubiquityrobotics.com/t/ros-node-for-the-raspberry-pi-camera-module/137/9 "2018-08-30T18:16:27Z")

</div>

Well in the camera image window of RViz I don’t see any aruco markers. If you can’t recognize them in the camera image then the robot will not be able to.

If you have generated some aruco markers, printed them out, and put them up in the space and they are being seen by the camera, and they do appear on the image window in rviz and the camera can see them clearly in high contrast then it all should work.

Sometime though even if they are seen by the camera the lighting is such that the image is either completely washed out light or too dark to see anything. In that situation you should run

rosrun rqt\_reconfigure rqt\_reconfigure

then you can adjust the exposure settings on the camera to make it more or less sensitive to the light and make the image more view-able.

I would do this on your laptop with the laptop connected to the robot as described in the "workstation setup " section of the documentation found here:

> **[How to set up a ROS workstation](https://learn.ubiquityrobotics.com/workstation_setup)**
>
> Tutorials for Magni

---

<div class="post-metadata">

**Author:** ![rohbotics](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/rohbotics/32/222_2.png) [@rohbotics](https://forum.ubiquityrobotics.com/u/rohbotics)\
**Post date:** [September 1, 2018, 3:59pm UTC](https://forum.ubiquityrobotics.com/t/ros-node-for-the-raspberry-pi-camera-module/137/10 "2018-09-01T15:59:06Z")

</div>

You need to configure aruco to use the right topic for the raspicam, which doesn’t use the default `/camera` topics.

Run `roslaunch aruco_detect aruco_detect.launch camera:=/raspicam_node` for your aruco launch.

Rohan

---

<div class="post-metadata">

**Author:** ![Max](https://forum.ubiquityrobotics.com/letter_avatar_proxy/v4/letter/m/e5b9ba/32.png) [@Max](https://forum.ubiquityrobotics.com/u/Max)\
**Post date:** [September 2, 2018, 12:52pm UTC](https://forum.ubiquityrobotics.com/t/ros-node-for-the-raspberry-pi-camera-module/137/11 "2018-09-02T12:52:55Z")

</div>

Hi,

Thanks all for your replay and help.

Rohan, you got my point, thank you so much bro, that was the problem, I did not know that I need to specify the raspicam for the the aruco detect. thought its linked to by default.

Best regards,  
Max

---

<div class="post-metadata">

**Author:** ![Max](https://forum.ubiquityrobotics.com/letter_avatar_proxy/v4/letter/m/e5b9ba/32.png) [@Max](https://forum.ubiquityrobotics.com/u/Max)\
**Post date:** [October 31, 2018, 2:04pm UTC](https://forum.ubiquityrobotics.com/t/ros-node-for-the-raspberry-pi-camera-module/137/12 "2018-10-31T14:04:37Z")

</div>

Hi @rohbotics  
I tried to go through the same approach but this time using another laptop with Ubuntu 14.04 and ros Indigo instead of the ubuntu 16.04 and ros kinetic.

I connected the laptop with the raspi\_cam that has been set up correctly.  
I have a problem in my laptop side when running

roslaunch aruco\_detect aruco\_detect.launch camera:=/raspicam\_node

I get the following:  
[aruco\_detect.launch] is neither a launch file in package [aruco\_detect] nor is [aruco\_detect] a launch file name  
The traceback for the exception was written to the log file

any ideas ?

Many thanks and best regards,  
Max

---

<div class="post-metadata">

**Author:** ![rohbotics](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/rohbotics/32/222_2.png) [@rohbotics](https://forum.ubiquityrobotics.com/u/rohbotics)\
**Post date:** [October 31, 2018, 4:24pm UTC](https://forum.ubiquityrobotics.com/t/ros-node-for-the-raspberry-pi-camera-module/137/13 "2018-10-31T16:24:48Z")

</div>

Do you have aruco\_detect installed on your laptop?

Also note, that mixing ROS versions is not recommended, and can cause many problems. (Not this particular problem though).

Edit: aruco\_detect was never released for indigo, and will likely not work. You will need to use a laptop with ROS Kinetic.
