Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all 248 articles
Browse latest View live

Creating Packages of ros--package_name type

$
0
0
Folks, How do I convert my catking workspace in the equivalent of a, for instance, ros-indigo-openni2_camera type? By that I mean, how can I distribute my packages to other computers without having to share my code? I want to have the same effect as when I do, for instance, sudo apt-get install ros-indigo-openni2-launch on my terminal. Thanks.

Why catkin_make install Hardcodes Project Paths?

$
0
0
Folks, I run catkin_make install in my catkin workspace, but it seems that when I check my "install/share/pacakage/cmake/," for my .cmake files, then I see that the paths are hardcoded with my computers user name, etc. How can I avoid this hardcoding when doing catkin_make install, so that I can transfer my packages to other computers? I first run: `catkin_make -DCMAKE_BUILD_TYPE=Release` and the I run `catkin_make install`. Is that the right procedure?

How to install sick_tim package

$
0
0
Hello i'm trying to install sick_tim package using the row sudo apt-get install ros-hydro-sick_tim unfortunately there is a mistake Unable to locate package ros-hydro-sick_tim in my opinion I make a syntax mistake using the wrong package's name or something similar...please help me to install the package

Which Linux distribution?

$
0
0
I want to set up ROS on a Raspberry Pi 3 and I want to do it in a way that others with perhaps less experience with Linux can replicate. So I found some instructions to put ROS on Ubuntu MATE. But I ended up with a full blown desktop OS complete with X11, an Office suite and web browser. It works fine but there is an order of magnitude to much stuff on the SD card. Yes I know how to remove packages but I'd have to document this This Pi3 will be physically mounted inside the robot and I doubt anyone will connect a monitor and keyboard and want to run rviz on the robot. But I will ssh in and build packages and do normal debugging My question is: What is the most appropriate Linux distribution to start with if the goal is a headless embedded Pi3 based ROS/Linux system?

catkin_make install and move package on another pc without source code

$
0
0
Hi all, I'm trying to figure out how to use the "catkin_make install" on PC1 to move a package on another PC2 for test purpose without source code. I created the install folder on the PC1, copied it on the PC2' home, source the seput.sh on PC2 related on the new path editing the .bashrc, but the package can't be recognized on PC2: if i try to launch something from the home, the package can't be found and if i try to run the launch file directly from the launch folder it gives me some python errors and at the end it say "resource not found". As long as the two PCs have different user names, is it possible to migrate a package to a different PC without source code using this method or not?? I've seen that the name of the PC1 remains in some file, could it be the problem? Please, help me, thanks!!!

Need help install gazebo

$
0
0
I am using jetson tx1. I could not install the full package of ros indigo only the base package so now I have to install gazebo separately. I am following the steps to install from tutorial but I have problem. First I don't have curl ubuntu@tegra-ubuntu:~/Documents$ curl -ssL http://get.gazebosim.org | sh bash: curl: command not found So I tried to install curl but I also have problem when install this: ubuntu@tegra-ubuntu:~/Documents$ sudo apt-get install curl [sudo] password for ubuntu: Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: curl : Depends: libcurl3 (= 7.35.0-1ubuntu2.10) but 7.35.0-1ubuntu2.6 is to be installed libpcre3-dev : Depends: libpcre3 (= 1:8.31-2ubuntu2.3) but 2:8.35-7.1ubuntu1 is to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution). ubuntu@tegra-ubuntu:~/Documents$ sudo apt-get -f install Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... failed. The following packages have unmet dependencies: libpcre3-dev : Depends: libpcre3 (= 1:8.31-2ubuntu2.3) but 2:8.35-7.1ubuntu1 is installed E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages. E: Unable to correct dependencies I don't know what should I do next. Please give me an advice. Thank you very much. Edit 1: Below is what happen if I install Pre-Built Debians ubuntu@tegra-ubuntu:~/Documents$ sudo apt-get install ros-indigo-gazebo-ros-pkgs ros-indigo-gazebo-ros-control [sudo] password for ubuntu: Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package ros-indigo-gazebo-ros-pkgs E: Unable to locate package ros-indigo-gazebo-ros-control Edit 2: Alternative Installation (http://gazebosim.org/tutorials?tut=install_ubuntu&cat=install) When I come to: sudo apt-get install gazebo7 I don't think I should install gazebo7 because it says that Indigo should go with gazebo2. Then I got ubuntu@tegra-ubuntu:~/Documents$ sudo apt-get install gazebo2 2 [sudo] password for ubuntu: Reading package lists... Done Building dependency tree Reading state information... Done Package gazebo2 is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package 'gazebo2' has no installation candidate

fatal error: angles/angles.h: No such file or directory #include

$
0
0
Hello, The question is pretty much in the title. I have that package I haven't done and that source install of kinetic on my laptop. When I'm trying to compile using catkin build I have this error message : fatal error: angles/angles.h: No such file or directory #include But when I look at my source install, I can find the file. The project compiled fine using a source install of indigo. Does anyone has any idea why it can't find that file ? I'm pretty sure I'm forgetting something trivial here... Some more info: I have source the setup of both my source install and my ws. ROS_ROOT=/home/malcolm/ros_catkin_ws/source_kinetic/install_isolated/share/ros ROS_PACKAGE_PATH=/home/malcolm/ros_catkin_ws/kinetic_ws/src/vision_opencv/cv_bridge:/home/malcolm/ros_catkin_ws/kinetic_ws/src/navigation/fake_localization:/home/malcolm/ros_catkin_ws/kinetic_ws/src/ndt_feature/flirtlib_ros:/home/malcolm/ros_catkin_ws/kinetic_ws/src/geometry2/geometry2:/home/malcolm/ros_catkin_ws/kinetic_ws/src/vision_opencv/image_geometry:/home/malcolm/ros_catkin_ws/kinetic_ws/src/navigation_msgs/map_msgs:/home/malcolm/ros_catkin_ws/kinetic_ws/src/navigation/map_server:/home/malcolm/ros_catkin_ws/kinetic_ws/src/navigation/amcl:/home/malcolm/ros_catkin_ws/kinetic_ws/src/navigation_msgs/move_base_msgs:/home/malcolm/ros_catkin_ws/kinetic_ws/src/navigation/navigation:/home/malcolm/ros_catkin_ws/kinetic_ws/src/pcl_msgs:/home/malcolm/ros_catkin_ws/kinetic_ws/src/pcl_conversions:/home/malcolm/ros_catkin_ws/kinetic_ws/src/perception_oru/perception_oru:/home/malcolm/ros_catkin_ws/kinetic_ws/src/perception_pcl/perception_pcl:/home/malcolm/ros_catkin_ws/kinetic_ws/src/navigation/robot_pose_ekf:/home/malcolm/ros_catkin_ws/kinetic_ws/src/perception_oru/sdf_tracker:/home/malcolm/ros_catkin_ws/kinetic_ws/src/semrob/semrob_conversions:/home/malcolm/ros_catkin_ws/kinetic_ws/src/semrob/semrob_generic:/home/malcolm/ros_catkin_ws/kinetic_ws/src/semrob/semrob_geometry:/home/malcolm/ros_catkin_ws/kinetic_ws/src/semrob/semrob_rviz:/home/malcolm/ros_catkin_ws/kinetic_ws/src/geometry2/tf2_msgs:/home/malcolm/ros_catkin_ws/kinetic_ws/src/geometry2/tf2:/home/malcolm/ros_catkin_ws/kinetic_ws/src/geometry2/tf2_bullet:/home/malcolm/ros_catkin_ws/kinetic_ws/src/geometry2/tf2_eigen:/home/malcolm/ros_catkin_ws/kinetic_ws/src/perception_pcl/pcl_ros:/home/malcolm/ros_catkin_ws/kinetic_ws/src/perception_oru/ndt_map:/home/malcolm/ros_catkin_ws/kinetic_ws/src/DAS:/home/malcolm/ros_catkin_ws/kinetic_ws/src/perception_oru/ndt_localization:/home/malcolm/ros_catkin_ws/kinetic_ws/src/perception_oru/ndt_registration:/home/malcolm/ros_catkin_ws/kinetic_ws/src/perception_oru/ndt_map_builder:/home/malcolm/ros_catkin_ws/kinetic_ws/src/perception_oru/ndt_rviz_visualisation:/home/malcolm/ros_catkin_ws/kinetic_ws/src/perception_oru/ndt_visualisation:/home/malcolm/ros_catkin_ws/kinetic_ws/src/perception_oru/ndt_costmap:/home/malcolm/ros_catkin_ws/kinetic_ws/src/perception_oru/ndt_feature_reg:/home/malcolm/ros_catkin_ws/kinetic_ws/src/perception_oru/ndt_fuser:/home/malcolm/ros_catkin_ws/kinetic_ws/src/perception_oru/ndt_mcl:/home/malcolm/ros_catkin_ws/kinetic_ws/src/ndt_feature/ndt_feature:/home/malcolm/ros_catkin_ws/kinetic_ws/src/geometry2/tf2_py:/home/malcolm/ros_catkin_ws/kinetic_ws/src/geometry2/tf2_ros:/home/malcolm/ros_catkin_ws/kinetic_ws/src/geometry2/tf2_geometry_msgs:/home/malcolm/ros_catkin_ws/kinetic_ws/src/geometry2/tf2_kdl:/home/malcolm/ros_catkin_ws/kinetic_ws/src/geometry2/tf2_sensor_msgs:/home/malcolm/ros_catkin_ws/kinetic_ws/src/geometry2/tf2_tools:/home/malcolm/ros_catkin_ws/kinetic_ws/src/navigation/voxel_grid:/home/malcolm/ros_catkin_ws/kinetic_ws/src/navigation/costmap_2d:/home/malcolm/ros_catkin_ws/kinetic_ws/src/navigation/nav_core:/home/malcolm/ros_catkin_ws/kinetic_ws/src/navigation/base_local_planner:/home/malcolm/ros_catkin_ws/kinetic_ws/src/navigation/carrot_planner:/home/malcolm/ros_catkin_ws/kinetic_ws/src/navigation/clear_costmap_recovery:/home/malcolm/ros_catkin_ws/kinetic_ws/src/navigation/dwa_local_planner:/home/malcolm/ros_catkin_ws/kinetic_ws/src/navigation/move_slow_and_clear:/home/malcolm/ros_catkin_ws/kinetic_ws/src/navigation/navfn:/home/malcolm/ros_catkin_ws/kinetic_ws/src/navigation/global_planner:/home/malcolm/ros_catkin_ws/kinetic_ws/src/navigation/rotate_recovery:/home/malcolm/ros_catkin_ws/kinetic_ws/src/navigation/move_base:/home/malcolm/ros_catkin_ws/source_kinetic/install_isolated/share ROS_MASTER_URI=http://localhost:11311 ROSLISP_PACKAGE_DIRECTORIES=/home/malcolm/ros_catkin_ws/kinetic_ws/devel/share/common-lisp ROS_DISTRO=kinetic ROS_ETC_DIR=/home/malcolm/ros_catkin_ws/source_kinetic/install_isolated/etc/ros This is the CMake of the project : cmake_minimum_required(VERSION 2.8.3) project(semrob_generic) ## Find catkin macros and libraries ## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) ## is used, also find other catkin packages find_package(catkin REQUIRED COMPONENTS cmake_modules) find_package(Boost REQUIRED COMPONENTS serialization) find_package(Eigen REQUIRED) ## System dependencies are found with CMake's conventions # find_package(Boost REQUIRED COMPONENTS system) message("VAR") # message(STATUS ${catkin_INCLUDE_DIRS}) MESSAGE( STATUS "CMAKE_CURRENT_BINARY_DIR: " ${catkin_INCLUDE_DIRS} ) message("DONNE") get_cmake_property(_variableNames VARIABLES) foreach (_variableName ${_variableNames}) message(STATUS "${_variableName}=${${_variableName}}") endforeach() ## Uncomment this if the package has a setup.py. This macro ensures ## modules and global scripts declared therein get installed ## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html # catkin_python_setup() ################################################ ## Declare ROS messages, services and actions ## ################################################ ## To declare and build messages, services or actions from within this ## package, follow these steps: ## * Let MSG_DEP_SET be the set of packages whose message types you use in ## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...). ## * In the file package.xml: ## * add a build_depend and a run_depend tag for each package in MSG_DEP_SET ## * If MSG_DEP_SET isn't empty the following dependencies might have been ## pulled in transitively but can be declared for certainty nonetheless: ## * add a build_depend tag for "message_generation" ## * add a run_depend tag for "message_runtime" ## * In this file (CMakeLists.txt): ## * add "message_generation" and every package in MSG_DEP_SET to ## find_package(catkin REQUIRED COMPONENTS ...) ## * add "message_runtime" and every package in MSG_DEP_SET to ## catkin_package(CATKIN_DEPENDS ...) ## * uncomment the add_*_files sections below as needed ## and list every .msg/.srv/.action file to be processed ## * uncomment the generate_messages entry below ## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...) ## Generate messages in the 'msg' folder # add_message_files( # FILES # Message1.msg # Message2.msg # ) ## Generate services in the 'srv' folder # add_service_files( # FILES # Service1.srv # Service2.srv # ) ## Generate actions in the 'action' folder # add_action_files( # FILES # Action1.action # Action2.action # ) ## Generate added messages and services with any dependencies listed here # generate_messages( # DEPENDENCIES # std_msgs # Or other packages containing msgs # ) ################################### ## 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 semrob_generic # CATKIN_DEPENDS other_catkin_pkg # DEPENDS system_lib ) ########### ## Build ## ########### ## Specify additional locations of header files ## Your package locations should be listed before other locations set(CMAKE_CXX_FLAGS "-std=c++0x ${CMAKE_CXX_FLAGS}") include_directories(include ${Boost_INCLUDE_DIR} ${Eigen_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS}) ## Declare a cpp library # add_library(semrob_generic # src/${PROJECT_NAME}/semrob_generic.cpp # ) ## Declare a cpp executable # add_executable(semrob_generic_node src/semrob_generic_node.cpp) ## Add cmake target dependencies of the executable/library ## as an example, message headers may need to be generated before nodes # add_dependencies(semrob_generic_node semrob_generic_generate_messages_cpp) ## Specify libraries to link a library or executable target against # target_link_libraries(semrob_generic_node # ${catkin_LIBRARIES} # ) ### --------------------- add_executable(random_test test/random_test.cc) target_link_libraries(random_test) add_executable(serialization_test test/serialization_test.cc) target_link_libraries(serialization_test -lboost_serialization) ############# ## Install ## ############# # all install targets should use catkin DESTINATION variables # See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html ## Mark executable scripts (Python etc.) for installation ## in contrast to setup.py, you can choose the destination # install(PROGRAMS # scripts/my_python_script # DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} # ) ## Mark executables and/or libraries for installation # install(TARGETS semrob_generic semrob_generic_node # ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} # LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} # RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} # ) ## Mark cpp header files for installation # install(DIRECTORY include/${PROJECT_NAME}/ # DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} # FILES_MATCHING PATTERN "*.h" # PATTERN ".svn" EXCLUDE # ) ## Mark other files for installation (e.g. launch and bag files, etc.) # install(FILES # # myfile1 # # myfile2 # DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} # ) ############# ## Testing ## ############# ## Add gtest based cpp test target and link libraries # catkin_add_gtest(${PROJECT_NAME}-test test/test_semrob_generic.cpp) # if(TARGET ${PROJECT_NAME}-test) # target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME}) # endif() ## Add folders to be run by python nosetests # catkin_add_nosetests(test)

how to install move_group_interface from source

$
0
0
Hi... I tried to install moveit / kinetic. I follow Source Install Tutorial from http://moveit.ros.org/install/source/ , but include file and llibrary not installed on my system on my program .cpp "#include --> give error : unresolved inclusion. if I copy the header file to correct location, on build time i got: undefined reference to `moveit::planning_interface::MoveGroupInterface::MoveGroupInterface Looks like the move_group_interface not installed. Same thing happen with planning_scene_interface (on moveit_ros too). But other package on moveit_core is OK. Please help how to install moveit from source. Thanks. **Update:** This is my CMakeLists.txt cmake_minimum_required(VERSION 2.8.3) project(robin_001) find_package(catkin REQUIRED COMPONENTS cmake_modules cv_bridge image_transport roscpp sensor_msgs std_msgs ) include_directories( ${catkin_INCLUDE_DIRS} ) ${catkin_EXPORTED_TARGETS}) add_definitions( -std=c++11 ) include_directories( $ENV{OPENNI2_INCLUDE} /usr/local/include #for realsense ) link_directories( $ENV{OPENNI2_REDIST} /usr/local/lib #for realsense ) link_libraries( -lOpenNI2 -lrealsense ) find_package(Eigen REQUIRED) include_directories(SYSTEM ${Boost_INCLUDE_DIR} ${EIGEN_INCLUDE_DIRS}) add_executable(Robin001 src/ArmControl.cpp src/ArmPosition.cpp src/Calibration.cpp src/Cam2World.cpp src/ColorTracking.cpp src/MarkPointDetector.cpp src/RobinArm.cpp src/SenseStream.cpp ) target_link_libraries(Robin001 ${catkin_LIBRARIES}) add_executable(RobinMoveit src/robin_moveit.cpp ) target_link_libraries(RobinMoveit ${catkin_LIBRARIES})

Can't Install ROS Indigo on the Raspberry Pi 2 model B(jessie)

$
0
0
I'm installing ROS Indigo on the Raspberry Pi 2 model B(jessie). I'm following [this tutorial](http://wiki.ros.org/ROSberryPi/Installing%20ROS%20Indigo%20on%20Raspberry%20Pi) .But I can't install ROS!! On 3.2.1 Unavailable Dpendencies, libconsole-bridge-dev of the tutorials, I execute command "`$ apt-get source -b console-bridge'`".Then I get a following error message. Linking CXX static library libgtest.a cd /home/pi/ros_catkin_ws/external_src/console-bridge-0.3.2/obj-arm-linux-gnueabihf/test && /usr/bin/cmake -P CMakeFiles/gtest.dir/cmake_clean_target.cmake CMake Error: Error in cmake code at /home/pi/ros_catkin_ws/external_src/console-bridge-0.3.2/obj-arm-linux-gnueabihf/test/CMakeFiles/gtest.dir/cmake_clean_target.cmake:1: Parse error. Expected a command name, got unquoted argument with text "ick]r� ". CMake Error: Error processing file: CMakeFiles/gtest.dir/cmake_clean_target.cmake test/CMakeFiles/gtest.dir/build.make:88: recipe for target 'test/libgtest.a' failed make[3]: *** [test/libgtest.a] Error 1 make[3]: Leaving directory '/home/pi/ros_catkin_ws/external_src/console-bridge-0.3.2/obj-arm-linux-gnueabihf' CMakeFiles/Makefile2:154: recipe for target 'test/CMakeFiles/gtest.dir/all' failed make[2]: *** [test/CMakeFiles/gtest.dir/all] Error 2 make[2]: Leaving directory '/home/pi/ros_catkin_ws/external_src/console-bridge-0.3.2/obj-arm-linux-gnueabihf' Makefile:130: recipe for target 'all' failed make[1]: *** [all] Error 2 make[1]: Leaving directory '/home/pi/ros_catkin_ws/external_src/console-bridge-0.3.2/obj-arm-linux-gnueabihf' dh_auto_build: make -j1 returned exit code 2 debian/rules:7: recipe for target 'build' failed make: *** [build] Error 2 dpkg-buildpackage: error: debian/rules build gave error exit status 2 Build command 'cd console-bridge-0.3.2 && dpkg-buildpackage -b -uc' failed. E: Child process failed I have no idea how I can solve the error. Can you please give me information on that?

I tried to install ROS again after uninstalling and i'm getting these error

$
0
0
The following packages have unmet dependencies: ros-kinetic-desktop-full : Depends: ros-kinetic-desktop but it is not going to be installed Depends: ros-kinetic-perception but it is not going to be installed Depends: ros-kinetic-simulators but it is not going to be installed E: Unable to correct problems, you have held broken packages. How can i resolve this issue!

how to install ros industrial core in ubuntu 16.04 LTS,apt-get install ros-hydro-industrial-desktop

$
0
0
how to install ros industrial core in ubuntu 16.04 LTS, when I try to run the command `apt-get install ros-hydro-industrial-desktop` it appears there is no package available root@ashokkumar-Satellite-C600:~# apt-get install ros-hydro-industrial-desktop Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package ros-hydro-industrial-desktop root@ashokkumar-Satellite-C600:~#

Compile erros installing Kinetic on Pi 2 Jessie

$
0
0
20160102 I am installing Kinetic on a raspberry pi 2 Jessie I think I'm getting errors on connection.cpp and subscriber.cpp? My directory structure is this: /home/dwulkan/robot/ros/catkin_ws +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ This is where I was in the installation when the error occurred +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3.3 Building the catkin Workspace Once you have completed downloading the packages and have resolved the dependencies, you are ready to build the catkin packages. Invoke catkin_make_isolated: $ sudo ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --install-space /opt/ros/kinetic +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ The error message(s) +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ [ 33%] Building CXX object CMakeFiles/roscpp.dir/src/libros/network.cpp.o [ 36%] Building CXX object CMakeFiles/roscpp.dir/src/libros/master.cpp.o [ 36%] Building CXX object CMakeFiles/roscpp.dir/src/libros/subscriber.cpp.o [ 38%] Building CXX object CMakeFiles/roscpp.dir/src/libros/common.cpp.o [ 39%] Building CXX object CMakeFiles/roscpp.dir/src/libros/publisher_link.cpp.o [ 40%] Building CXX object CMakeFiles/roscpp.dir/src/libros/service_publication.cpp.o [ 42%] Building CXX object CMakeFiles/roscpp.dir/src/libros/connection.cpp.o c++: internal compiler error: Killed (program cc1plus) Please submit a full bug report, with preprocessed source if appropriate. See for instructions. CMakeFiles/roscpp.dir/build.make:110: recipe for target 'CMakeFiles/roscpp.dir/src/libros/subscriber.cpp.o' failed make[2]: *** [CMakeFiles/roscpp.dir/src/libros/subscriber.cpp.o] Error 4 make[2]: *** Waiting for unfinished jobs.... c++: internal compiler error: Killed (program cc1plus) Please submit a full bug report, with preprocessed source if appropriate. See for instructions. CMakeFiles/roscpp.dir/build.make:158: recipe for target 'CMakeFiles/roscpp.dir/src/libros/publisher_link.cpp.o' failed make[2]: *** [CMakeFiles/roscpp.dir/src/libros/publisher_link.cpp.o] Error 4 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ connection.cpp /* * Software License Agreement (BSD License) * * Copyright (c) 2008, Willow Garage, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * * Neither the name of Willow Garage, Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "ros/connection.h" #include "ros/transport/transport.h" #include "ros/file_log.h" #include #include #include namespace ros { Connection::Connection() : is_server_(false) , dropped_(false) , read_filled_(0) , read_size_(0) , reading_(false) , has_read_callback_(0) , write_sent_(0) , write_size_(0) , writing_(false) , has_write_callback_(0) , sending_header_error_(false) { } Connection::~Connection() { ROS_DEBUG_NAMED("superdebug", "Connection destructing, dropped=%s", dropped_ ? "true" : "false"); drop(Destructing); } void Connection::initialize(const TransportPtr& transport, bool is_server, const HeaderReceivedFunc& header_func) { ROS_ASSERT(transport); transport_ = transport; header_func_ = header_func; is_server_ = is_server; transport_->setReadCallback(boost::bind(&Connection::onReadable, this, _1)); transport_->setWriteCallback(boost::bind(&Connection::onWriteable, this, _1)); transport_->setDisconnectCallback(boost::bind(&Connection::onDisconnect, this, _1)); if (header_func) { read(4, boost::bind(&Connection::onHeaderLengthRead, this, _1, _2, _3, _4)); } } boost::signals2::connection Connection::addDropListener(const DropFunc& slot) { boost::recursive_mutex::scoped_lock lock(drop_mutex_); return drop_signal_.connect(slot); } void Connection::removeDropListener(const boost::signals2::connection& c) { boost::recursive_mutex::scoped_lock lock(drop_mutex_); c.disconnect(); } void Connection::onReadable(const TransportPtr& transport) { (void)transport; ROS_ASSERT(transport == transport_); readTransport(); } void Connection::readTransport() { boost::recursive_mutex::scoped_try_lock lock(read_mutex_); if (!lock.owns_lock() || dropped_ || reading_) { return; } reading_ = true; while (!dropped_ && has_read_callback_) { ROS_ASSERT(read_buffer_); uint32_t to_read = read_size_ - read_filled_; if (to_read > 0) { int32_t bytes_read = transport_->read(read_buffer_.get() + read_filled_, to_read); ROS_DEBUG_NAMED("superdebug", "Connection read %d bytes", bytes_read); if (dropped_) { return; } else if (bytes_read < 0) { // Bad read, throw away results and report error ReadFinishedFunc callback; callback = read_callback_; read_callback_.clear(); read_buffer_.reset(); uint32_t size = read_size_; read_size_ = 0; read_filled_ = 0; has_read_callback_ = 0; if (callback) { callback(shared_from_this(), read_buffer_, size, false); } break; } read_filled_ += bytes_read; } ROS_ASSERT((int32_t)read_size_ >= 0); ROS_ASSERT((int32_t)read_filled_ >= 0); ROS_ASSERT_MSG(read_filled_ <= read_size_, "read_filled_ = %d, read_size_ = %d", read_filled_, read_size_); if (read_filled_ == read_size_ && !dropped_) { ReadFinishedFunc callback; uint32_t size; boost::shared_array buffer; ROS_ASSERT(has_read_callback_); // store off the read info in case another read() call is made from within the callback callback = read_callback_; size = read_size_; buffer = read_buffer_; read_callback_.clear(); read_buffer_.reset(); read_size_ = 0; read_filled_ = 0; has_read_callback_ = 0; ROS_DEBUG_NAMED("superdebug", "Calling read callback"); callback(shared_from_this(), buffer, size, true); } else { break; } } if (!has_read_callback_) { transport_->disableRead(); } reading_ = false; } void Connection::writeTransport() { boost::recursive_mutex::scoped_try_lock lock(write_mutex_); if (!lock.owns_lock() || dropped_ || writing_) { return; } writing_ = true; bool can_write_more = true; while (has_write_callback_ && can_write_more && !dropped_) { uint32_t to_write = write_size_ - write_sent_; ROS_DEBUG_NAMED("superdebug", "Connection writing %d bytes", to_write); int32_t bytes_sent = transport_->write(write_buffer_.get() + write_sent_, to_write); ROS_DEBUG_NAMED("superdebug", "Connection wrote %d bytes", bytes_sent); if (bytes_sent < 0) { writing_ = false; return; } write_sent_ += bytes_sent; if (bytes_sent < (int)write_size_ - (int)write_sent_) { can_write_more = false; } if (write_sent_ == write_size_ && !dropped_) { WriteFinishedFunc callback; { boost::mutex::scoped_lock lock(write_callback_mutex_); ROS_ASSERT(has_write_callback_); // Store off a copy of the callback in case another write() call happens in it callback = write_callback_; write_callback_ = WriteFinishedFunc(); write_buffer_ = boost::shared_array(); write_sent_ = 0; write_size_ = 0; has_write_callback_ = 0; } ROS_DEBUG_NAMED("superdebug", "Calling write callback"); callback(shared_from_this()); } } { boost::mutex::scoped_lock lock(write_callback_mutex_); if (!has_write_callback_) { transport_->disableWrite(); } } writing_ = false; } void Connection::onWriteable(const TransportPtr& transport) { (void)transport; ROS_ASSERT(transport == transport_); writeTransport(); } void Connection::read(uint32_t size, const ReadFinishedFunc& callback) { if (dropped_ || sending_header_error_) { return; } { boost::recursive_mutex::scoped_lock lock(read_mutex_); ROS_ASSERT(!read_callback_); read_callback_ = callback; read_buffer_ = boost::shared_array(new uint8_t[size]); read_size_ = size; read_filled_ = 0; has_read_callback_ = 1; } transport_->enableRead(); // read immediately if possible readTransport(); } void Connection::write(const boost::shared_array& buffer, uint32_t size, const WriteFinishedFunc& callback, bool immediate) { if (dropped_ || sending_header_error_) { return; } { boost::mutex::scoped_lock lock(write_callback_mutex_); ROS_ASSERT(!write_callback_); write_callback_ = callback; write_buffer_ = buffer; write_size_ = size; write_sent_ = 0; has_write_callback_ = 1; } transport_->enableWrite(); if (immediate) { // write immediately if possible writeTransport(); } } void Connection::onDisconnect(const TransportPtr& transport) { (void)transport; ROS_ASSERT(transport == transport_); drop(TransportDisconnect); } void Connection::drop(DropReason reason) { ROSCPP_LOG_DEBUG("Connection::drop(%u)", reason); bool did_drop = false; { boost::recursive_mutex::scoped_lock lock(drop_mutex_); if (!dropped_) { dropped_ = true; did_drop = true; } } if (did_drop) { drop_signal_(shared_from_this(), reason); transport_->close(); } } bool Connection::isDropped() { boost::recursive_mutex::scoped_lock lock(drop_mutex_); return dropped_; } void Connection::writeHeader(const M_string& key_vals, const WriteFinishedFunc& finished_callback) { ROS_ASSERT(!header_written_callback_); header_written_callback_ = finished_callback; if (!transport_->requiresHeader()) { onHeaderWritten(shared_from_this()); return; } boost::shared_array buffer; uint32_t len; Header::write(key_vals, buffer, len); uint32_t msg_len = len + 4; boost::shared_array full_msg(new uint8_t[msg_len]); memcpy(full_msg.get() + 4, buffer.get(), len); *((uint32_t*)full_msg.get()) = len; write(full_msg, msg_len, boost::bind(&Connection::onHeaderWritten, this, _1), false); } void Connection::sendHeaderError(const std::string& error_msg) { M_string m; m["error"] = error_msg; writeHeader(m, boost::bind(&Connection::onErrorHeaderWritten, this, _1)); sending_header_error_ = true; } void Connection::onHeaderLengthRead(const ConnectionPtr& conn, const boost::shared_array& buffer, uint32_t size, bool success) { (void)size; ROS_ASSERT(conn.get() == this); ROS_ASSERT(size == 4); if (!success) return; uint32_t len = *((uint32_t*)buffer.get()); if (len > 1000000000) { ROS_ERROR("a header of over a gigabyte was " \ "predicted in tcpros. that seems highly " \ "unlikely, so I'll assume protocol " \ "synchronization is lost."); conn->drop(HeaderError); } read(len, boost::bind(&Connection::onHeaderRead, this, _1, _2, _3, _4)); } void Connection::onHeaderRead(const ConnectionPtr& conn, const boost::shared_array& buffer, uint32_t size, bool success) { ROS_ASSERT(conn.get() == this); if (!success) return; std::string error_msg; if (!header_.parse(buffer, size, error_msg)) { drop(HeaderError); } else { std::string error_val; if (header_.getValue("error", error_val)) { ROSCPP_LOG_DEBUG("Received error message in header for connection to [%s]: [%s]", transport_->getTransportInfo().c_str(), error_val.c_str()); drop(HeaderError); } else { ROS_ASSERT(header_func_); transport_->parseHeader(header_); header_func_(conn, header_); } } } void Connection::onHeaderWritten(const ConnectionPtr& conn) { ROS_ASSERT(conn.get() == this); ROS_ASSERT(header_written_callback_); header_written_callback_(conn); header_written_callback_ = WriteFinishedFunc(); } void Connection::onErrorHeaderWritten(const ConnectionPtr& conn) { (void)conn; drop(HeaderError); } void Connection::setHeaderReceivedCallback(const HeaderReceivedFunc& func) { header_func_ = func; if (transport_->requiresHeader()) read(4, boost::bind(&Connection::onHeaderLengthRead, this, _1, _2, _3, _4)); } std::string Connection::getCallerId() { std::string callerid; if (header_.getValue("callerid", callerid)) { return callerid; } return std::string("unknown"); } std::string Connection::getRemoteString() { std::stringstream ss; ss << "callerid=[" << getCallerId() << "] address=[" << transport_->getTransportInfo() << "]"; return ss.str(); } } ++++++++++++++++++++++++++++++++++++++ subscriber.cpp /* * Copyright (C) 2009, Willow Garage, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the names of Stanford University or Willow Garage, Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "ros/subscriber.h" #include "ros/node_handle.h" #include "ros/topic_manager.h" namespace ros { Subscriber::Impl::Impl() : unsubscribed_(false) { } Subscriber::Impl::~Impl() { ROS_DEBUG("Subscriber on '%s' deregistering callbacks.", topic_.c_str()); unsubscribe(); } bool Subscriber::Impl::isValid() const { return !unsubscribed_; } void Subscriber::Impl::unsubscribe() { if (!unsubscribed_) { unsubscribed_ = true; TopicManager::instance()->unsubscribe(topic_, helper_); node_handle_.reset(); helper_.reset(); } } Subscriber::Subscriber(const std::string& topic, const NodeHandle& node_handle, const SubscriptionCallbackHelperPtr& helper) : impl_(boost::make_shared()) { impl_->topic_ = topic; impl_->node_handle_ = boost::make_shared(node_handle); impl_->helper_ = helper; } Subscriber::Subscriber(const Subscriber& rhs) { impl_ = rhs.impl_; } Subscriber::~Subscriber() { } void Subscriber::shutdown() { if (impl_) { impl_->unsubscribe(); } } std::string Subscriber::getTopic() const { if (impl_) { return impl_->topic_; } return std::string(); } uint32_t Subscriber::getNumPublishers() const { if (impl_ && impl_->isValid()) { return TopicManager::instance()->getNumPublishers(impl_->topic_); } return 0; } } // namespace ros

Tutorial question 'Using rosmsg' error

$
0
0
Hello, I have been going through the tutorials for the first time, but got stuck on the 'Using rosmsg' section. The command is : `rosmsg show beginner_tutorials/Num`, and the error is Unable to load msg [beginner_tutorials/Num]: Cannot locate message [Num]: unknown package [beginner_tutorials] on search path [ ... I tried re-making the package and carefully reviewed the instructions. I haven't had any other error until now. Some further information: - the command: `rossrv show beginner_tutorials/AddTwoInts` gives a similar error. - I am sightly confused over the code section that says: > Also make sure you export the message runtime dependency.> catkin_package( ... CATKIN_DEPENDS message_runtime ... ...) Am I supposed to just uncomment this line only? I notice in the `CMakeLists.txt` there are a lot of other 'instructions', I have been ignoring them I assume this is correct? -I am running Ubuntu 16.04 on VirtualBox, I haven't had any issues with it. The forum won't let me upload files yet. Thanks for your help. Perigalacticon

How to build a package from source on Ubuntu MATE 16.04 LTS and ROS Kinetic?

$
0
0
There are two packages that I could build from source for their respective reasons. The first one is `ardrone-autonomy`. This package, as indicated by [this](http://answers.ros.org/question/252390/cant-install-ardrone_autonomy/) question, is not being installed on my computer with the command `sudo apt-get install ros-kinetic-ardrone-autonomy`. The other package is `lsd-slam`. This package, as indicated by [this](http://answers.ros.org/question/250822/how-to-install-lsd_slam-on-my-ros/) question, must be built from source. `lsd-slam` is yet to be released for **ros-kinetic**. Now The standard instructions for building from source are: $ cd ~/ros_catkin_ws $ rosinstall_generator ros_desktop --rosdistro kinetic --deps --wet-only --tar > kinetic-custom_ros.rosinstall $ wstool merge -t src kinetic-custom_ros.rosinstall $ wstool update -t src $ rosdep install --from-paths src --ignore-src --rosdistro kinetic -y -r --os=debian:jessie $ sudo ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --install-space /opt/ros/kinetic But when you install kinetic using the command, `sudo apt-get install ros-kinetic-desktop-full`, the folder `~/ros_catkin_ws` is not created in your root directory. So how exactly am I supposed to proceed with the installation of `ardrone-autonomy`? I know [these](http://wiki.ros.org/catkin/Tutorials/using_rosbuild_with_catkin) are the instructions for installing `lsd-slam`, but this also need me to use `catkin_make` and that would need `~/ros_catkin_ws`. What exactly am I supposed to do here?

ROS on win32 laptop VM - is it possible?

$
0
0
Hi, I have a win32 3G-RAM laptop. I installed VM for the sake of ROS. Tried ubuntu 16.04, failed to install ROS on it. (unmet dependencies) Tried ubuntu 14.04, it is impossibly slow. Tried ubuntu 13.10, again, unmet dependencies that are not going to be installed. I am new to ROS. Is it possible to run ROS on a not-so-strong laptop? What is the best configuration? Thanks Tova

Package installation - github or wiki

$
0
0
Hello. I am trying to use a stereo camera and I found two links below. https://github.com/tum-vision/lsd_slam http://wiki.ros.org/elp_stereo_camera They introduce how to install the package of the stereo camera. I am curious which one is correct? It means there are two way to install the stereo camera?

libfcl-0.5-dev cant resolve depends

$
0
0
Building moveit from source on a debian jessie install on a hP Xeon Proliant server. rosdep Unable to locate package libfcl-0.5-dev Couldn't find any package by regex 'libfcl-0.5.dev' my last issue was because my `sources.list` was messed, up and I did a `apt-get update` and solve it, if this has any bearing.... Thanks for all the assistance.

What does the following ROS command do ?

$
0
0
Hi, While reading on the ros answer wiki page, I come across the following command about which I don't know much. The command is - "rosdep install --from-paths src/ --ignore-src --rosdistro indigo". Link:- http://answers.ros.org/question/252478/how-to-build-a-package-from-source-on-ubuntu-mate-1604-lts-and-ros-kinetic/

[moveIt! ]catkin_package() include dir 'include/eigen3' does not exist relative to

$
0
0
Error at /opt/ros/indigo/share/catkin/cmake/catkin_package.cmake:296 (message): catkin_package() include dir 'include/eigen3' does not exist relative to '/home//moveIt_ws/src/moveit/moveit_kinematics' environment: ROS indigo ubuntu14.04 moveIt! 0.7.8 build from source fix package.xml and CMakeLists.txt in moveit/moveit_kinematics/ https://github.com/YuehChuan/moveit/commit/c3e16461d1541846bc7171d4bdf2167ba23e6922 here are my history https://hackmd.io/s/BJAiRmxje#

Catkin: Building install space from prebuilt devel space

$
0
0
Hello, I have a catkin/ros project with full install rules, and I use 'catkin build' to build the project. I am trying to make it so I can build the project in a normal devel/build space, and then generate an installer from those results, but I am having issues understanding how catkin wants me to do this. Building with an install space enabled produces a correct installer. Unfortunately, enabling the install space requires rebuilding everything. catkin clean #Start Fresh catkin build #Build devel space catkin config --install #Enable install space catkin build #Fails saying it is necessary to clean first catkin clean catkin config --install #Already set above, just making it clear this is set. catkin build #Correctly builds install space! But cleaning and rebuilding (with different compiler flags is not acceptable). My current solution is catkin clean #Start Fresh catkin build #Build devel space catkin build -j1 --make-args install #Necessary to make catkin/cmake not randomly crash The j1 is there because without it, catkin has threading issues and fails randomly (likely because I am triggering the install rules without catkin knowing so it does not create the install locks). I am trying to figure out the RIGHT way to make an install from an already build project, but the documentation has not mentioned it, or is referring to very old versions of catkin that are no longer applicable. Are there any documents or commands/arguments I should look into?
Viewing all 248 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>