ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
2014-10-03 22:06:33 -0500 | received badge | ● Teacher (source) |
2014-10-03 22:06:33 -0500 | received badge | ● Self-Learner (source) |
2013-03-13 16:47:12 -0500 | received badge | ● Famous Question (source) |
2013-03-13 16:47:12 -0500 | received badge | ● Popular Question (source) |
2013-03-13 16:47:12 -0500 | received badge | ● Notable Question (source) |
2012-08-20 10:04:21 -0500 | received badge | ● Famous Question (source) |
2012-01-12 19:04:28 -0500 | received badge | ● Notable Question (source) |
2011-06-24 01:39:12 -0500 | received badge | ● Popular Question (source) |
2011-06-04 08:01:52 -0500 | answered a question | Opencv python LineIterator returning position information? I couldn't find an existing one, so I reimplemented the algorithm here; but I still feel like the built-in line iterator should return position information. def bresenham_march(img, p1, p2): x1 = p1[0] y1 = p1[1] x2 = p2[0] y2 = p2[1] steep = math.fabs(y2 - y1) > math.fabs(x2 - x1) if steep: t = x1 x1 = y1 y1 = t t = x2 x2 = y2 y2 = t also_steep = x1 > x2 if also_steep: t = x1 x1 = x2 x2 = t t = y1 y1 = y2 y2 = t dx = x2 - x1 dy = math.fabs(y2 - y1) error = 0.0 delta_error = 0.0; # Default if dx is zero if dx != 0: delta_error = math.fabs(dy/dx) if y1 < y2: y_step = 1 else: y_step = -1 y = y1 ret = list([]) for x in range(x1, x2): if steep: p = (y, x) else: p = (x, y) (b,r,g,a) = (-1,)*4 if p[0] < img.width and p[1] < img.height: (b,r,g, a) = cv.Get2D(img, p[1], p[0]) ret.append((p,(b,r,g))) error += delta_error if error >= 0.5: y += y_step error -= 1 if also_steep: ret.reverse() return ret |
2011-06-04 07:58:56 -0500 | asked a question | Opencv python LineIterator returning position information? In the python sample for InitLineIterator here: Copied below for convenience: >>> import cv >>> img = cv.LoadImageM("building.jpg", cv.CV_LOAD_IMAGE_COLOR) >>> li = cv.InitLineIterator(img, (100, 100), (125, 150)) >>> red_sum = 0 >>> green_sum = 0 >>> blue_sum = 0 >>> for (r, g, b) in li: ... red_sum += r ... green_sum += g ... blue_sum += b >>> print red_sum, green_sum, blue_sum 10935.0 9496.0 7946.0 Is there a way to also get the pixel positon? |
2011-03-11 05:59:25 -0500 | commented answer | Trouble building Roslib (diamondback) on 64-bit OSX Snow Leopard. There must have been cruft from a migration I did from an old Mac, I was able to get it to build, although I did have to tweak the install_dirs() in rosboost_cfg.py it seemed to always return the empty string. |
2011-03-11 05:57:05 -0500 | received badge | ● Scholar (source) |
2011-03-11 05:57:05 -0500 | marked best answer | Trouble building Roslib (diamondback) on 64-bit OSX Snow Leopard. My roslib compile works out-of-the-box (diamondback, 10.6, 64-bit). These lines look very suspicious: Building for Intel for Mac OS X < 10.4? It looks like your build environment is screwed up. Maybe you have MACOSX_DEPLOYMENT_TARGET set in your environment? |
2011-03-10 12:54:11 -0500 | received badge | ● Autobiographer |
2011-03-08 08:40:47 -0500 | commented answer | Trouble building Roslib (diamondback) on 64-bit OSX Snow Leopard. I'm also building on the latest rev of Mac Book Pro released on February 24, 2011. |
2011-03-08 08:24:58 -0500 | commented answer | Trouble building Roslib (diamondback) on 64-bit OSX Snow Leopard. I do not have MACOSX_DEPLOYMENT_TARGET set. Setting it to 10.6 does not seem to help. |
2011-03-08 08:15:04 -0500 | commented question | Trouble building Roslib (diamondback) on 64-bit OSX Snow Leopard. 'rosmake roslib' is the part I'm having issue with. |
2011-03-05 08:38:00 -0500 | received badge | ● Student (source) |
2011-03-05 04:34:17 -0500 | received badge | ● Supporter (source) |
2011-03-05 04:22:26 -0500 | asked a question | Trouble building Roslib (diamondback) on 64-bit OSX Snow Leopard. I just pulled down the latest ros-turtle, diamond back and it doesn't seem to build on OSX 64-bit. I'm following along on the install wiki. And it fails to build with: Finished <<< roslib [FAIL] [ 29.47 seconds ] the output log says: cd build && cmake -Wdev -DCMAKE_TOOLCHAIN_FILE=`rospack find rosbuild`/rostoolchain.cmake .. -- The C compiler identification is GNU -- The CXX compiler identification is GNU -- Checking whether C compiler has -isysroot -- Checking whether C compiler has -isysroot - yes -- Checking whether C compiler supports OSX deployment target flag -- Checking whether C compiler supports OSX deployment target flag - yes -- Check for working C compiler: /usr/bin/gcc -- Check for working C compiler: /usr/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Checking whether CXX compiler has -isysroot -- Checking whether CXX compiler has -isysroot - yes -- Checking whether CXX compiler supports OSX deployment target flag -- Checking whether CXX compiler supports OSX deployment target flag - yes -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done [rosbuild] Building package roslib [rosbuild] Cached build flags older than manifests; calling rospack to get flags [rosbuild] Including /Users/mike/Code/ros/ros_comm/clients/roslisp/cmake/roslisp.cmake [rosbuild] Including /Users/mike/Code/ros/ros_comm/clients/rospy/cmake/rospy.cmake [rosbuild] Including /Users/mike/Code/ros/ros_comm/clients/cpp/roscpp/cmake/roscpp.cmake -- Configuring done -- Generating done -- Build files have been written to: /Users/mike/Code/ros/ros/core/roslib/build cd build && make -l4 Scanning dependencies of target rospack_genmsg_libexe [ 0%] Built target rospack_genmsg_libexe Scanning dependencies of target rosbuild_precompile [ 0%] Built target rosbuild_precompile Scanning dependencies of target roslib [100%] Building CXX object CMakeFiles/roslib.dir/src/package.o In file included from /usr/include/architecture/i386/math.h:626, from /usr/include/math.h:28, from /usr/include/c++/4.2.1/cmath:54, from /opt/local/include/boost/config/no_tr1/cmath.hpp:21, from /opt/local/include/boost/date_time/posix_time/posix_time_config.hpp:15, from /opt/local/include/boost/date_time/posix_time/posix_time_system.hpp:13, from /opt/local/include/boost/date_time/posix_time/ptime.hpp:12, from /opt/local/include/boost/date_time/posix_time/posix_time_types.hpp:12, from /opt/local/include/boost/thread/thread_time.hpp:11, from /opt/local/include/boost/thread/locks.hpp:12, from /opt/local/include/boost/thread/pthread/mutex.hpp:12, from /opt/local/include/boost/thread/mutex.hpp:16, from /Users/mike/Code/ros/ros/core/roslib/src/package.cpp:37: /usr/include/AvailabilityMacros.h:108:14: warning: #warning Building for Intel with Mac OS X Deployment Target < 10.4 is invalid. Linking CXX shared library ../lib/libroslib.dylib ld: -rpath can only be used when targeting Mac OS X 10.5 or later collect2: ld returned 1 exit status make[3]: *** [../lib/libroslib.dylib] Error 1 make[2]: *** [CMakeFiles/roslib.dir/all] Error 2 make[1]: *** [all] Error 2 make: *** [all] Error 2 Has anyone else seen anything like this? Any help ... (more) |