Ask Your Question

mechanicalmanb's profile - activity

2019-09-21 20:59:44 -0500 received badge  Good Question (source)
2018-04-19 09:20:09 -0500 received badge  Nice Question (source)
2016-01-22 07:46:57 -0500 received badge  Taxonomist
2014-11-20 19:28:10 -0500 received badge  Student (source)
2014-07-13 21:27:57 -0500 answered a question Control Multiple Ardrones in simulator

I don't know about tum_simulator, but with actual ARDrones the issue may be with duplicate IP addresses between the two drones. I don't have two drones to mess around with though, so I can't test or confirm any of this.

The ARDrone SDK says the following:

The AR.Drone 2.0 can be controlled from any client device supporting Wifi. The following process is followed :

  1. the AR.Drone creates a WIFI network with an ESSID usually called adrone2_xxx (ardrone_xxx for AR.Drone 1.0 ) and self allocates a free, odd IP address (typically 192.168.1.1).
  2. the user connects the client device to this ESSID network.
  3. the client device requests an IP address from the drone DHCP server.
  4. the AR.Drone DHCP server grants the client with an IP address which is:

    the drone own IP address plus 1 (for AR.Drone 1.0 prior to version 1.1.3)

    the drone own IP address plus a number between 1 and 4 (for AR.Drone 2.0 and AR.Drone 1.0 after 1.1.3 version)

  5. the client device can start sending requests the AR.Drone IP address and its services ports
2014-07-13 21:08:55 -0500 answered a question rate of subscribing

You can use a client/server node pair (and a queue/buffer in the server node) to avoid lag build up. For example, if you are gathering camera images in a node and publishing them slightly faster than a subscriber node can display them, lag will build up over time. Take this difference to an extreme and it is essentially how a high speed camera is used. If you implement the client/server + queue, the node collecting camera images will still gather frames faster than the display node can show them, but you can pick keyframes out of the queue to eliminate any lag up to that point.

I was unaware of the topic_tools/throttle solution. That sounds like it would accomplish what I described above, but you would need to know a priori the processing rate of the display node, right?

2014-07-13 20:49:22 -0500 answered a question OpenCv troubles

Is that an error you get using catkin_make? In your CmakeLists.txt are you using a cmake find module for openCV? As in:

find_package(OpenCV REQUIRED)

Then later

target_link_libraries(your_executable_name ${OpenCV_LIBS} ${catkin_LIBRARIES})

I've had to do that when working with the ARDrone.

2014-06-13 21:58:30 -0500 received badge  Supporter (source)
2014-06-13 21:05:11 -0500 received badge  Famous Question (source)
2014-06-10 14:37:35 -0500 received badge  Famous Question (source)
2014-06-02 14:28:48 -0500 received badge  Notable Question (source)
2014-06-02 05:51:54 -0500 received badge  Popular Question (source)
2014-05-31 11:36:31 -0500 received badge  Enthusiast
2014-05-30 03:55:44 -0500 received badge  Self-Learner (source)
2014-05-30 03:55:44 -0500 received badge  Teacher (source)
2014-05-29 15:21:18 -0500 answered a question catkin, linking order, undefined reference to symbol

Found the answer in some loosely related topics. I can't explain WHY this works, but it does.

You need to use a package finding .cmake module for ffmpeg. You can find one here:

https: //code.google.com/r/kyberneticist-webport/source/browse/cmake_modules/FindFFMPEG.cmake

After the find_package( ) for catkin, set the CMAKE_MODULE_PATH variable to where you put the FindFFMPEG.cmake file, assuming your project is "ardrone_2":

set(CMAKE_MODULE_PATH ${ardrone_2_SOURCE_DIR})

Then use find_package on FFMPEG:

find_package(FFMPEG)

The FindFFMPEG.cmake file sets the FFMPEG_LIBRARIES variable:

set(FFMPEG_LIBRARIES
  ${FFMPEG_LIBAVCODEC}
  ${FFMPEG_LIBAVFORMAT}
  ${FFMPEG_LIBAVUTIL}
)

Setting the CMAKE_MODULE_PATH messes up the whatever directory cmake thinks it's in, so you need to specify absolute paths when you use add_executable( ), assuming your package is "ardrone_2":

add_executable(h264_decoder_node ${ardrone_2_SOURCE_DIR}/src/h264_decoder.cpp)

Then link using that variable:

target_link_libraries(h264_decoder_node ${catkin_LIBRARIES} ${FFMPEG_LIBRARIES} swscale)
2014-05-28 16:43:20 -0500 asked a question catkin, linking order, undefined reference to symbol

What controls the linking order in a catkin_make build? I am trying to link to ffmpeg, but I am getting a strange "undefined reference to symbol" error, not a normal undefined reference error that would happen if I forgot to include the library in target_link_libraries( ). Everything I can find about that sort of error is related to incorrectly putting command line linking flags (e.g. -lavcodec) before the object that uses them, i.e. incorrect linking order. But I don't know how to control that with the CMakeLists.txt file.

If I add the library avutil to the target_link_libraries( ), the error switches to a normal undefined reference error. But avutil is the library with those functions, so I have no idea why it still thinks I'm not linking to it. The avcodec library includes avutil, and when I built standalone applications (not ROS) of my own I never had to link to avutil explicitly if I linked to avcodec.

Any ideas?

The catkin_make error:

 Linking CXX executable /home/jason/ROS/ARDrone/devel/lib/ardrone_2/h264_decoder_node
[  0%] [  0%] Built target gensrv_eus
Built target genmanifest_eus
[  0%] [  1%] Built target genmsg_eus
Built target at_controller_node
[  3%] [  4%] Built target video_client_node
Built target navdata_client_node
[ 98%] Built target ardrone_2_ALL_GEN_OUTPUT_FILES_eus
/usr/bin/ld: CMakeFiles/h264_decoder_node.dir/src/h264_decoder.cpp.o: undefined reference to symbol 'av_frame_free@@LIBAVUTIL_52'
/usr/local/lib/libavutil.so.52: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [/home/jason/ROS/ARDrone/devel/lib/ardrone_2/h264_decoder_node] Error 1
make[1]: *** [ardrone_2/CMakeFiles/h264_decoder_node.dir/all] Error 2
make: *** [all] Error 2
Invoking "make" failed

The CMakeLists.txt file:

cmake_minimum_required(VERSION 2.8.3)
project(ardrone_2)
find_package(catkin REQUIRED COMPONENTS 
                roscpp 
                message_generation 
                std_msgs
                image_transport)

###################################
## catkin specific configuration ##
###################################
## The catkin_package macro generates cmake config files for your package
## Declare things to be passed to dependent projects
## INCLUDE_DIRS: uncomment this if you package contains header files
## LIBRARIES: libraries you create in this project that dependent projects also need
## CATKIN_DEPENDS: catkin_packages dependent projects also need
## DEPENDS: system dependencies of this project that dependent projects also need
catkin_package(
#  INCLUDE_DIRS include
#  LIBRARIES ardrone_2
#  CATKIN_DEPENDS other_catkin_pkg
#  DEPENDS
)

###########
## Build ##
###########

## Specify additional locations of header files
## Your package locations should be listed before other locations
# include_directories(include)
include_directories(include ${catkin_INCLUDE_DIRS} /usr/local/include)

## Declare a cpp library
# add_library(ardrone_2
#   src/${PROJECT_NAME}/ardrone_2.cpp
# )

## Declare a cpp executable
add_executable(navdata_client_node src/navdata_client.cpp)
add_executable(at_controller_node src/at_controller.cpp)
add_executable(video_client_node src/video_client.cpp)
add_executable(h264_decoder_node src/h264_decoder.cpp)

## Add cmake target dependencies of the executable/library
## as an example, message headers may need to be generated before nodes
# add_dependencies(ardrone_2_node ardrone_2_generate_messages_cpp)

## Specify libraries to link a library or executable target against
# target_link_libraries(ardrone_2_node
#   ${catkin_LIBRARIES}
# )
target_link_libraries(navdata_client_node ${catkin_LIBRARIES})
target_link_libraries(at_controller_node ${catkin_LIBRARIES})
target_link_libraries(video_client_node ${catkin_LIBRARIES})
target_link_libraries(h264_decoder_node ${catkin_LIBRARIES} avcodec avformat swscale)
2014-05-27 01:58:45 -0500 received badge  Notable Question (source)
2014-05-02 02:18:17 -0500 commented question rospack depends1 error, rosdep version?

I had installed python 2.7.6 and python 3.4 with default options before attempting to install ROS hydro. I agree with you, I think that there are some serious low level conflicts going on here that are beyond my skill. I installed Ubuntu 14.04 and installed ROS Indigo first, which works fine so far.

2014-05-01 20:26:35 -0500 received badge  Popular Question (source)
2014-05-01 14:12:37 -0500 commented question rospack depends1 error, rosdep version?

Those are the exact instructions I used. Line by line.

2014-05-01 13:10:11 -0500 received badge  Editor (source)
2014-05-01 02:57:34 -0500 asked a question rospack depends1 error, rosdep version?

I am trying to install Hydro on Ubuntu 12.04. I follow the directions straight through, everything seems to install perfectly fine. I make my way through the tutorials until I make it to creating an ROS package. (I'd include the link to the tutorial here as the tutorial itself recommends, but I have insufficient karma to do so).

When I try to run the line " $ rospack depends1 beginner_tutorials "

It throws an error, telling me that my rosdep version needs to be at least 0.10.40. (Sorry I'm on a different computer right now...I will try to reproduce the full error message and post it here in an edit ASAP).

I check my rosdep version with " $ rosdep --version ", and it tells me that I have 0.10.27 installed.

First, I'm very confused: following the tutorials from installation all the way here lead me to install versions that are already out of date and can't work. Did I miss something? I spend the next few hours trying to install some kind of newer version of rosdep, but I think there is something majorly wrong with my python installations (I have a couple versions and I haven't tightly controlled PYTHONPATH, etc. -- I'm new to python and basically never use it).

So bottom line, 3 questions:

  1. Did I miss something in the installation tutorial that would automatically install the proper rosdep version?

  2. If not, can the tutorial change to address this issue somehow?

  3. Can anyone recommend a tutorial on proper installation (and removing improper installation!) and PYTHONPATH setup for the python version that ROS Hydro needs?


EDIT 1: The full error message:

$ rospack depends1 beginner_tutorials
ImportError: No module named rosdep2.rospack
ImportError: No module named rosdep2.rospack
[rospack] Error: could not find python module 'rosdep2.rospack'. is rosdep up-to-date (at least 0.10.4)?

EDIT 2: I added to PYTHONPATH PYTHONPATH=/opt/ros/hydro/lib/python2.7/dist-packages:/usr/lib/pymodules/python2.7/rosdep2 because I found rosdep2/rospack.py in that folder. Now I get a different error:

 $ rospack depends1 beginner_tutorials 
    Traceback (most recent call last):
      File "/usr/lib/pymodules/python2.7/rosdep2/__init__.py", line 40, in <module>
        from .installers import InstallerContext, Installer, \
      File "/usr/lib/pymodules/python2.7/rosdep2/installers.py", line 35, in <module>
        from rospkg.os_detect import OsDetect
      File "/usr/lib/pymodules/python2.7/rospkg/__init__.py", line 43, in <module>
        from .rospack import RosPack, RosStack, \
      File "/usr/lib/pymodules/python2.7/rospkg/rospack.py", line 34, in <module>
        from xml.etree.cElementTree import ElementTree
      File "/usr/local/lib/python2.7/xml/etree/cElementTree.py", line 3, in <module>
        from _elementtree import *
    ImportError: /usr/local/lib/python2.7/lib-dynload/_elementtree.so: undefined symbol: PyUnicodeUCS2_DecodeUTF8
    Traceback (most recent call last):
      File "/usr/lib/pymodules/python2.7/rosdep2/__init__.py", line 40, in <module>
        from .installers import InstallerContext, Installer, \
      File "/usr/lib/pymodules/python2.7/rosdep2/installers.py", line 35, in <module>
        from rospkg.os_detect import OsDetect
      File "/usr/lib/pymodules ...
(more)