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

taogashi's profile - activity

2018-06-17 11:22:30 -0500 received badge  Famous Question (source)
2017-11-13 22:55:16 -0500 commented question Error while cross-compiling rospkg for arm

The same error...

2017-04-19 17:52:21 -0500 received badge  Famous Question (source)
2017-03-07 15:19:11 -0500 received badge  Notable Question (source)
2017-03-07 15:19:11 -0500 received badge  Popular Question (source)
2016-04-06 21:41:16 -0500 asked a question different result from camera calibration

image description

image description

My calibration setup: a square chessboard on the wall(outdoor), the camera was held by hand and take pictures from different view.

the first calibration gives:

camera matrix
4036.306897 0.000000 627.648230
0.000000 4046.875620 370.241373
0.000000 0.000000 1.000000

distortion
-0.410160 -1.105400 -0.005716 0.002621 0.000000

while the second gives:

camera matrix
4046.339746 0.000000 692.904718
0.000000 4058.010391 368.021828
0.000000 0.000000 1.000000

distortion
-0.396681 -1.172958 -0.005052 -0.003120 0.000000

These results obviously differ much. I am quite confused.

BTW, I found that the skew bar could hardly make any progress during the calibration, even the view angle was larger than 45 degree. What's more, the chessboard couldn't be recognized with larger view angle.

2016-03-31 00:49:39 -0500 received badge  Necromancer (source)
2016-03-31 00:49:39 -0500 received badge  Teacher (source)
2015-12-17 22:13:21 -0500 received badge  Notable Question (source)
2015-11-21 20:21:51 -0500 commented answer any example of rosserial_embeddedlinux over serial port?

Thanks for your answer. However I prefer rosserial because I suppose it not only perform transparent transmission but also some protocol to ensure reliable communication.

2015-11-18 09:12:12 -0500 received badge  Popular Question (source)
2015-11-17 10:29:07 -0500 asked a question any example of rosserial_embeddedlinux over serial port?

The examples of rosserial_embeddedlinux are all about TCP connection, sometimes there're needs to communicate between ROS and an bare linux system without ROS. And it's weird when I click the FAQ it pops all 24840 questions in ROS Answer to me, So I decide to raise the 24841 one. Any help?

2015-11-17 05:36:12 -0500 received badge  Enthusiast
2015-11-16 21:02:50 -0500 answered a question About the camera calibration parameters

Great! But my calibration result of a monocular camera gives different camera matrix K and projection matrix P:

image_width: 1280
image_height: 720
camera_name: head_camera
camera_matrix:
rows: 3
cols: 3
data: [1191.684030513793, 0, 612.2327036330117, 0, 1190.477585826093, 386.1943923951908, 0, 0, 1]
distortion_model: plumb_bob
distortion_coefficients:
rows: 1
cols: 5
data: [-0.4279928528758908, 0.2098535466268812, 0.001734967304558237, -0.0001708439997913541, 0]
rectification_matrix:
rows: 3
cols: 3
data: [1, 0, 0, 0, 1, 0, 0, 0, 1]
projection_matrix:
rows: 3
cols: 4
data: [1030.564331054688, 0, 602.9148174812726, 0, 0, 1139.198486328125, 388.5892694416107, 0, 0, 0, 1, 0]

which makes me confused...

2015-10-20 03:12:27 -0500 received badge  Editor (source)
2015-10-19 07:12:47 -0500 answered a question Garbled image problem on usb_cam

Hi Allen!

I found that this problem is caused by linking wrong libraries. Try

ldd devel/lib/usb_cam/usb_cam_node

to see which lib is linked.

My ffmpeg was installed by apt-get from a ppa repository, the default location of such packages is /opt. But anyhow cmake didn't find the correct libavcodec and libswscale.

Later I install ffmpeg from source, install those libraries in /usr/local/lib, and manual set variable avcodec_LIBRARIES and INCLUDE_DIRS as:

## pkg-config libraries
# find_package(PkgConfig REQUIRED)
# pkg_check_modules(avcodec libavcodec REQUIRED)
# pkg_check_modules(swscale libswscale REQUIRED)

set(avcodec_LIBRARIES /usr/local/lib/libavcodec.so.57)
set(swscale_LIBRARIES /usr/local/lib/libswscale.so.4)
set(avcodec_INCLUDE_DIRS /usr/local/include/libavcodec)
set(swscale_INCLUDE_DIRS /usr/local/include/libswscale)

And, as the new version ffmpeg has changed some of its variable/function names, I have to modify the code of usb_cam. Lucky, only a little at the begin of usb_cam.cpp:

#define avcodec_alloc_frame av_frame_alloc
#define PIX_FMT_RGB24 AV_PIX_FMT_RGB24
#define PIX_FMT_YUV422P AV_PIX_FMT_YUV422P

Hope it helps!


Have you found the solution? I encountered exactly the same problem... the same ubuntu, the same indigo, my ffmpeg is something like:

ffmpeg version N-76045-g97be5d4 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04)
configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg --enable-avresample --disable-debug --enable-nonfree --enable-gpl --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-decoder=amrnb --disable-decoder=amrwb --enable-libpulse --enable-libdcadec --enable-libfreetype --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libvorbis --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libspeex --enable-libass --enable-avisynth --enable-libsoxr --enable-libxvid --enable-libvo-aacenc --enable-libvidstab
libavutil      55.  4.100 / 55.  4.100
libavcodec     57.  6.100 / 57.  6.100
libavformat    57.  4.100 / 57.  4.100
libavdevice    57.  0.100 / 57.  0.100
libavfilter     6. 11.100 /  6. 11.100
libavresample   3.  0.  0 /  3.  0.  0
libswscale      4.  0.100 /  4.  0.100
libswresample   2.  0.100 /  2.  0.100
libpostproc    54.  0.100 / 54.  0.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
2015-08-06 09:23:49 -0500 commented answer "fatal error: 'QMetaType' file not found" when building ROS Indigo on OS X 10.10.3

indigo on OSX 10.10.4, however I've never got image_view run on my Mac...

2015-06-28 20:14:09 -0500 received badge  Notable Question (source)
2015-06-28 20:14:09 -0500 received badge  Popular Question (source)
2015-06-28 20:14:09 -0500 received badge  Famous Question (source)
2015-06-26 01:00:07 -0500 received badge  Supporter (source)
2015-06-26 00:59:46 -0500 answered a question "fatal error: 'QMetaType' file not found" when building ROS Indigo on OS X 10.10.3

@ppg you know how I appreciate your answer ! a shell script may help for file in grep -rl "4\.8\.6" .|grep Makefile do sed -i '' "s/4.8.6/4.8.7/g" $file done

2014-11-23 02:30:02 -0500 commented question pkg_check_modules doesn't get the right libavcodec

Thanks ahendrix! I've tried and updated my question.

2014-11-22 23:24:42 -0500 asked a question pkg_check_modules doesn't get the right libavcodec

I've struggled some time to make usb_cam to support mjpeg format usb camera, as libavcodec and libswscale that come with ROS somehow cannot work properly. it complains No accelerated colorspace conversion found from yuv422p to rgb24.

So I installed a new ffmpeg that enables libx264. After that, two versions of ffmpeg exist in my file system, the old one locates in /usr/lib/x86_64-linux-gnu, the new one in /usr/local/lib. In order to find the correct version, I changed two lines in the CMakeLists.txt :

pkg_check_modules(avcodec libavcodec>=56.12 REQUIRED) 

pkg_check_modules(swscale libswscale>=3.1 REQUIRED)

If I run cmake inside the usb_cam directory, pkg_check_modules can find the correct header file and libraries, however if I run catkin_make, it returns the old ones. how could pkg_check_modules behave differently with/without ROS? Don't know what to do ...

Thanks to ahendrix! I added a few lines to print some pkgconfig-generated value

MESSAGE(STATUS "@@@@@@@@@@@@@@@@@ " ${avcodec_LIBRARIES})
MESSAGE(STATUS "@@@@@@@@@@@@@@@@@ " ${avcodec_LIBRARY_DIRS})
MESSAGE(STATUS "@@@@@@@@@@@@@@@@@ " ${avcodec_LDFLAGS})
MESSAGE(STATUS "@@@@@@@@@@@@@@@@@ " ${avcodec_INCLUDE_DIRS})
MESSAGE(STATUS "@@@@@@@@@@@@@@@@@ " ${avcodec_CFLAGS})
MESSAGE(STATUS "@@@@@@@@@@@@@@@@@ " ${avcodec_VERSION})
MESSAGE(STATUS "@@@@@@@@@@@@@@@@@ " ${avcodec_PREFIX})
MESSAGE(STATUS "@@@@@@@@@@@@@@@@@ " ${avcodec_INCLUDEDIR})
MESSAGE(STATUS "@@@@@@@@@@@@@@@@@ " ${avcodec_LIBDIR})

After I delete build/ and devel/ and run catkin_make as ahendrix suggestes, cmake output message shows it found the right version

-- checking for module 'libavcodec'
--   found libavcodec, version 56.13.100
-- checking for module 'libswscale'
--   found libswscale, version 3.1.101
-- @@@@@@@@@@@@@@@@@ avcodec
-- @@@@@@@@@@@@@@@@@ /usr/local/lib
-- @@@@@@@@@@@@@@@@@ -L/usr/local/lib-lavcodec
-- @@@@@@@@@@@@@@@@@ /usr/local/include
-- @@@@@@@@@@@@@@@@@ -I/usr/local/include
-- @@@@@@@@@@@@@@@@@ 56.13.100
-- @@@@@@@@@@@@@@@@@ /usr/local
-- @@@@@@@@@@@@@@@@@ /usr/local/include
-- @@@@@@@@@@@@@@@@@ /usr/local/lib

however, when ran this node "rosrun usb_cam usb_cam_node _pixel_format:=mjpeg", it just end with segment fault. But if write the CMakeLists.tst like

 #find_package(PkgConfig REQUIRED)
 #pkg_check_modules(avcodec libavcodec REQUIRED)
 #pkg_check_modules(swscale libswscale REQUIRED)

 set(avcodec_INCLUDE_DIRS /usr/local/include/libavcodec) 

 set(swscale_INCLUDE_DIRS /usr/local/include/libswscale)

 set(avcodec_LIBRARIES /usr/local/lib/libavcodec.so.56)

 set(swscale_LIBRARIES /usr/local/lib/libswscale.so.3)

usb_cam turns to work. So I wonder what happens to make such difference.