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:
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
I made the following test:
raspistill -o test.jpg
There was no error
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!
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:
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:
Terminal 1 - Connection to magni robot and starting roscore
Terminal 2 - Connection to magni robot and starting this command
roslaunch raspicam_node camerav2_1280x960.launch
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?
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: https://learn.ubiquityrobotics.com/
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?
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
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.
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:
Print the marker 49
Log in magni robot
Open Terminal 1 for magni robot and check the robot software:
rosnode list
Here is the result:
/controller_spawner
/joint_state_publisher
/joy_node
/motor_node
/robot_state_publisher
/rosbridge_ws/rosapi
/rosbridge_ws/rosbridge_websocket
/rosbridge_wss/rosapi
/rosbridge_wss/rosbridge_websocket
/rosout
/teleop_twist_joy
/tf2_web_republisher
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)
Hello,
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.
The application fiducial_follow doesn’t work.
Here is my step by step work:
Print the marker 49
Switch on magni robot and log in to its network
Open Terminal 1 for magni robot and check the robot software:
rosnode list
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.
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.