raspberry pi cam node for melodic ubuntu 18.04 server
hello,
I installed a fresh Ubuntu server 64-bit os with ubuntu melodic. I have raspberry pi camera v1.3, Is there any alternative of raspicam_node for melodic.
I tried to git clone raspicam_node on raspberry pi 4 but CMake error[ could not find mmal libraries ]
any suggestion what to do?
error :
Asked by kallivalli on 2020-07-02 07:28:04 UTC
Answers
I too had problems with raspicam_node on Pi4. So I fall back to trying to install similar to:
‘https://github.com/fpasteau/raspicam_node‘,
and
‘https://github.com/raspberrypi/userland‘
I then did the following step-by-step commands:
cd src/
git clone https://github.com/6by9/userland.git
cd userland/
git checkout 64bit_mmal
./buildme –aarch64
ls /opt/vc/bin/
raspivid
/opt/vc/bin/raspivid
find . -name libmmal_core.so
This now runs:
LD_PRELOAD=”/opt/vc/lib/libmmal_vc_client.so /opt/vc/lib/libvcsm.so /opt/vc/lib/libmmal_core.so /opt/vc/lib/libmmal_util.so” /opt/vc/bin/raspistill -o cam.jpg
Which is a step closer. After fixing the runtime errors, it works.
Enable ROS raspicam_node
To enable rapicam_node, do the following steps:
cd catkin_ws/src/
git clone https://github.com/fpasteau/raspicam_node.git raspicam
cd ..
catkin_make
source devel/setup.bash
export LD_PRELOAD=”/opt/vc/lib/libmmal_vc_client.so /opt/vc/lib/libvcsm.so /opt/vc/lib/libmmal_core.so /opt/vc/lib/libmmal_util.so”
rosrun raspicam raspicam_node _height:=1280 _width:=960
In another terminal:
rosservice call /camera/start_capture
There are more details here: https://rhoeby.com/blog/adding-ros-raspberry-pi-4b-camera/
Asked by jordan on 2020-07-02 14:30:09 UTC
Comments
i had an error after ./buildme -arch64 in userland sectioninterface/khronos/CMakeFiles/khrn_client.dir/build.make:134: recipe for target 'interface/khronos/CMakeFiles/khrn_client.dir/common/khrn_int_hash_asm.s.o' failed
so what to do it didnt compiled successfully
Asked by kallivalli on 2020-07-03 01:22:34 UTC
You might need to start with a fresh install of Ubuntu/ROS, as per:
https://rhoeby.com/blog/install-ros-on-raspberry-pi-4b/
It worked for me.
Asked by jordan on 2020-07-03 08:11:41 UTC
I dropped the plan of using raspicam_node, instead used usb_cam now it worked
Asked by kallivalli on 2020-07-15 23:12:46 UTC
There is a typo, it should be
./buildme --aarch64
double dash Then it compiles
Asked by Wintermute on 2020-08-14 05:12:07 UTC
I get this error for every command I type in the terminal after following the instructions
/usr/bin/clear_console: error while loading shared libraries: libvchiq_arm.so: cannot open shared object file: No such file or directory
I am using rasp4 with ubuntu 18.04 arm64
Asked by rezenders on 2021-05-06 13:40:02 UTC
Hello, I might be bit late but I will try to post each steps that I have followed to build it without errors. (but still i get few warnings) Thanks @jordan for the answer
I am working with turtlebot3 waffle with pi 3b+ and ros-melodic. The OS provided by the robotist.
$ cd ~/catkin_ws/src
$ git clone https://github.com/UbiquityRobotics/raspicam_node.git
$ sudo echo "yaml https://raw.githubusercontent.com/UbiquityRobotics/rosdep/master/raspberry-pi.yaml" >> /etc/ros/rosdep/sources.list.d/30-ubiquity.list
$ rosdep update
$ cd ~/catkin_ws
$ sudo apt update
$ sudo apt dist-upgrade
$ rosdep install --from-paths src --ignore-src --rosdistro=melodic -y
$ cd ~/catkin_ws/src/
$ git clone https://github.com/fpasteau/raspicam_node.git raspicam
$ cd userland/
$ git checkout 64bit_mmal
$ ./buildme –-aarch64
$ sudo cp -a ~/catkin_ws/src/userland/build/lib/. /opt/vc/lib/
$ cd ~/catkin_ws
$ catkin build
now it doesn't give the error while building. But When I try to launch the node using roslaunch raspicam_node camerav2_1280x960.launch
it gives the following error
process[raspicam_node-1]: started with pid [24639]
* failed to open vchiq instance
I have tried to do udo usermod -a -G video $USER
and logout-login as well as reboot.
now I get following error
process[raspicam_node-1]: started with pid [1327]
* failed to open vchiq instance
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::lock_error> >'
pure virtual method called
terminate called recursively
After trying out the sudo chmod 777 /dev/vchiq
the above errors disappeared and now I have new set of errors. (Progress yeyy)
process[raspicam_node-1]: started with pid [1167]
mmal: mmal_vc_shm_init: could not initialize vc shared memory service
mmal: mmal_vc_component_create: failed to initialise shm for 'vc.ril.camera' (7:EIO)
mmal: mmal_component_create_core: could not create component 'vc.ril.camera' (7)
mmal: Failed to create camera component
[ERROR] [1639127867.867726100]: Failed to create camera component
[ERROR] [1639127867.877881881]: init_cam: Failed to create camera component
I will have a look int that. in the meantime if someone knows what this error about, please let me know.
Thanks
Asked by aarsh_t on 2022-03-25 05:21:35 UTC
Comments
Might help if you post the text of the error.
Asked by jordan on 2020-07-02 08:58:18 UTC