How to Test my Camera?

I’ve just bought a Magni Robot. I’ve installed everything. I use a PC with installed Ubuntu 16.04.7 LTS. I have installed ROS according to your instructions. I have established a connection with the robot and I have tested the following programs:

rosrun teleop_twist_keyboard
roslaunch magni_demos simple_navigation.launch

Now I want to test the camera

  1. Here is my ~/.bashrc file (two of the lines that I set)
    export ROS_MASTER_URI=http://ubiquityrobot.local:11311
    export ROS_HOSTNAME=tiho.local

  2. I made the following test:
    raspistill -o test.jpg
    There was no error

  3. I made the folowing test:
    rosrun image_view image_view image:=/raspicam_node/image
    There is a problem with the camera ([ INFO] [1610375568.998749404]: Using transport “raw”)
    I have 2 terminals:
    Terminal 1: Connected to the robot and ROS started with roscore
    Terminal 2: Host PC and written instruction:
    rosrun image_view image_view image:=/raspicam_node/image

There is something wrong in my work with the camera
Please help!

For step 2 the file you made called test.jpg can be viewed if you get it to a pc and use some form of jpg image viewer.

For your step 3: Take a look at section 4.1 of this page:
I think it will solve your problem with seeing live video from the raspicam.

In order to use image_view you must start a process to publish the camera image to /raspicam_node ROS topic. You are missing that step.
A second problem with what you did is default is to assume a ‘raw’ image but it is compressed.
So on above page in section 4.1 you will see this command:

rosrun image_view image_view image:=/raspicam_node/image _image_transport:=compressed 

Hope this helps,


Thank you for your help!
I’ve tested successfully my camera and it is working fine. Here is my screenshot. I have one warning related with the camera calibration. I didn’t execute this task because I don’t know how.
Here is my work in step by step:

  1. Terminal 1 - Connection to magni robot and starting roscore
  2. Terminal 2 - Connection to magni robot and starting this command
    roslaunch raspicam_node camerav2_1280x960.launch
  3. Terminal 3 - Connection to my workstation and starting this command
    rosrun image_view image_view image:=/raspicam_node/image _image_transport:=compressed

Now I can see a live video from raspicam.
The warning is in terminal 2, telling me that the camera calibration file /home/ubuntu/ .ros/camera_info/camerav2_1280x960.yaml not found.
How can I resolve this problem? Could you please help?

Thank you in advance!

Well there’s two options that could cause that warning: either the yaml is actually missing (you can generate one using the camera calibrator) or the launch file may be having problems parsing the path.

The latter has happened to me once or twice, the quick workaround is to replace the dynamic package syntax (i.e. package://etc.) to an absolute path that you can get with pwd. Using $(find raspicam_node) should also work.

As a general point, you will likely very much want to know what is on our document site not just for this but for a great many other things. That site will likely be extremely helpful for many reasons. Please be sure you know about and have looked here:

Besides the link MoffKalast has supplied also if you really feel you need a camera calibration then see midway into our camera page here: another link that I feel is more specific and with pictures that are directly for the cal required with raspicam for camera calibration is at the end of our discussion of Camera Calibration and is thus:

That warning only matters if you want to use the camera frames to precisely measure or inspect things like Fiducials. If you are not using fiducials for navigation it is likely you are just fine because it defaults to some fairly close cal defaults. Making your own camera calibration data is quite involved frankly. So if you don’t need it, don’t go there is my advice. Do you really need a calibrated camera?

Thank you for your help!

I’ve started to calibrate my camera.
I followed the instructions from github, made in my PC not in magni robot

  1. I didn’t try the installation instructions but I jumped to the Build instructions
  2. Go to cd ~/catkin_ws/src
  3. git clone
  4. Go to /etc/ros/rosdep/sources.list.d/ - creating 30-ubiquity.list and adding: yaml
  5. rosdep update
  6. cd ~/catkin_ws
  7. rosdep install --from-paths src --ignore-src --rosdistro=kinetic -y

Here I received the following error:

ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
rqt_mypkg: Cannot locate rosdep definition for [rqt_gui plugin="${prefix} /plugin.xml"/>]

Then I have deleted the directory rqt_mypkg. I received the following error:
E: Unable to locate package libraspberrypi0
ERROR: the following rosdeps failed to install
apt: command [sudo -H apt-get install -y libraspberrypi0] failed

Please, help to resolve this problem!

If you use our image there is zero need to pull and compile the raspicam_node, it is all there on the image already. Try not to overcomplicate your dev. Please tell me what part of our learn pages told you to pull and remake raspicam_node. I want to fix this by removing that part of the instructions.

At this time because the image is now in some unknown state I suggest you get a clean image from Nov 2020 and then go right to this page:



How I can get a clean image from Nov 2020? I have a PC with ubuntu 16.04.7 LTS and ROS installed. I tried to launch the fiducial follow application. Here is my step by step work:

  1. Print the marker 49
  2. Log in magni robot
  3. Open Terminal 1 for magni robot and check the robot software:
    rosnode list

Here is the result:

  1. Start the application
    roslaunch magni_demos fiducial_follow.launch

The magni robot started to look for the marker rotating around. I put the marker in front of the robot but the robot was rotating again. I’ve checked the camera starting the image viewer:
roslaunch raspicam_node camerav2_1280x960.launch - Terminal 1 (magni robot)
rosrun image_view image_view image:=/raspicam_node/image _image_transport:=compressed - Terminal 2 (workstation)

There is a live view of the camera.

I checked the camera with
raspistill -o cam.jpg

It was OK, without errors

Could you please help? Thank you again!

You have likely done this but because you have not stated it exactly let me make clear this point.

The only reason for the PC on 16.04 is to be able to monitor what the robot is doing perhaps from viewing video images in this case.

The fiducial_follow application must be launched on the robot itself.
This means you must do something like an ssh session to the Magni robot from your workstation.

You cannot run fiducial follow on the PC.

Next: The magni robot must have the proper IP address of your laptop and your laptop name in the magni robot /etc/hosts file. This is a common issue of confusion.

Hope this helps,

The application fiducial_follow doesn’t work.
Here is my step by step work:

  1. Print the marker 49
  2. Switch on magni robot and log in to its network
  3. Open Terminal 1 for magni robot and check the robot software:
    rosnode list
  4. Start the application roslaunch magni_demos foducial_follow.launch

The magni robot started to look for the marker rotating around. I put the marker in front of the camera but without success.

I know that I have to control the robot via ssh session through my workstation. I can see the camera images in real time. I can control the robot using the phone application. I can control the robot by the PC keyboard too. But I can’t control the magni robot using fiducials. I think that the configuration related with the laptop IP and the magni robot is OK once I can launch the application with keyboard control.

Please help!

When I show the marker to the magni robot he is starting to go to the marker and stops when it is 1 meter from the robot. On this way it can follow me. I think that the application is working now. If I use better camera is it possible to use the same application? Could you please advise? Thank you!

Glad you were able to get it going now.
Using a different camera gets very complex for config, calibration and config files and so on.
I will say that if you wanted to mess around with that on your own you would learn a great deal if you get it to work. We have experimented and used assorted cameras for different things from time to time so yes it is certainly ‘possible’ but rather involved frankly.

The pieces at a very high level are at least these things:

  • have a proper camera driver to be able to generate a ROS topic with an image stream
  • Optionally generate a camera calibration file although for fiducial follow that is not super important
  • Change several ROS launch files so that correct camera resolution is specified for the image topic

I will say that EVERY time I do it I get confused and I have done it at least 6 times.
So beware and do not try that unless you really really need to do it or you very much want to do a deep dive into ROS and learn a lot of things on your own.

Have fun and good luck,