ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

raspberry pi cam node for melodic ubuntu 18.04 server

asked 2020-07-02 07:28:04 -0600

kallivalli gravatar image

updated 2020-07-03 05:12:11 -0600

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 :

image description

edit retag flag offensive close merge delete

Comments

Might help if you post the text of the error.

jordan gravatar image jordan  ( 2020-07-02 08:58:18 -0600 )edit

2 Answers

Sort by » oldest newest most voted
0

answered 2020-07-02 14:30:09 -0600

jordan gravatar image

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-ra...

edit flag offensive delete link more

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

kallivalli gravatar image kallivalli  ( 2020-07-03 01:22:34 -0600 )edit

You might need to start with a fresh install of Ubuntu/ROS, as per:

https://rhoeby.com/blog/install-ros-o...

It worked for me.

jordan gravatar image jordan  ( 2020-07-03 08:11:41 -0600 )edit

I dropped the plan of using raspicam_node, instead used usb_cam now it worked

kallivalli gravatar image kallivalli  ( 2020-07-15 23:12:46 -0600 )edit

There is a typo, it should be

./buildme --aarch64

double dash Then it compiles

Wintermute gravatar image Wintermute  ( 2020-08-14 05:12:07 -0600 )edit

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

rezenders gravatar image rezenders  ( 2021-05-06 13:40:02 -0600 )edit
0

answered 2022-03-25 05:21:35 -0600

aarsh_t gravatar image

updated 2022-03-25 05:46:50 -0600

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

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-07-02 07:28:04 -0600

Seen: 3,858 times

Last updated: Mar 25 '22