ros

Why is my pcl cuda code running in CPU instead of GPU?

人走茶凉 提交于 2019-12-13 03:44:01
问题 I have a code where I use the pcl/gpu namespace: pcl::gpu::Octree::PointCloud clusterCloud; clusterCloud.upload(cloud_filtered->points); pcl::gpu::Octree::Ptr octree_device (new pcl::gpu::Octree); octree_device->setCloud(clusterCloud); octree_device->build(); /*tree->setCloud (clusterCloud);*/ // Create the cluster extractor object for the planar model and set all the parameters std::vector<pcl::PointIndices> cluster_indices; pcl::gpu::EuclideanClusterExtraction ec; ec.setClusterTolerance (0

ROS message sent but not received

走远了吗. 提交于 2019-12-13 02:24:03
问题 I'm using ROS in my project and I need to send one message from time to time. I have this function: void RosNetwork::sendMessage(string msg, string channel) { _mtx.lock(); ros::Publisher chatter_pub = _n.advertise<std_msgs::String>(channel.c_str(),10); ros::Rate loop_rate(10); std_msgs::String msgToSend; msgToSend.data = msg.c_str(); chatter_pub.publish(msgToSend); loop_rate.sleep(); cout << "Message Sent" << endl; _mtx.unlock(); } And I have this in python: def callbackFirst(data): #rospy

Ros Dynamic Config file

喜你入骨 提交于 2019-12-13 01:15:27
问题 I am trying to perform a segmentation task with PCL/ROS. I am using the dynamic configuration option in ROS as the number of inputs to my segmentation task is large and would like to study the influence of each param . There is no problem with my C++ source code, however when I try to run the launch file my file publisher is not able to find the PCD files. <launch> <!-- Start segmentation analysis --> <node pkg="segmentation_analysis" name="region_growing" type="region_growing" output="screen

How to install Robot Operating System ROSJava on Windows?

蹲街弑〆低调 提交于 2019-12-12 22:01:05
问题 The documentation for ROS is terrible. One great irony is that the Groovy and ROSJava versions of ROS was created to allow developers on platforms like Windows to utilize the great robotics SDK, while all the installation instructions are still geared toward linux/ubuntu users. The ROSJava core documentation says: TODO: write a guide for a strictly java installation. I've tried to follow the instructions here on the Google Code project, but seeing as all the instructions assume I'm running

Qt binary linked to both Qt 5 and (wrongly) to Qt 4 causing segmentation fault when linked to Qwt

大兔子大兔子 提交于 2019-12-12 17:52:27
问题 I have a Qt / ROS / Qwt application. Everything was going fine until I tried to link to Qwt. Note that I'm using Qwt 6.1.2 which should run on Qt 5.5. Indeed, the examples run fine. When I run my binary, it crashes even if I'm not using Qwt. I just need to link the my code to Qwt for that to happen. And -here is the issue I think-, gdb gives the following error: ram received signal SIGSEGV, Segmentation fault. 0x00007ffff25eadfc in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 Which is

How to change directory of a library in a package in ros ubuntu

梦想与她 提交于 2019-12-12 17:10:33
问题 I have installed opencv2.4.9(With No CUDA) by unzip opencv2.4.9.zip in home. Many successful codes are using this library. Now I wanna rebuild opencv2.4.9(with CUDA) in another folder. I don't wanna delete the previous folder because I don't wanna face any problem later on and make my older code can't function. So, the question is how to change the name of the directory? Seems like we link the package with library in CMake like below: include_directories( ${catkin_INCLUDE_DIRS} ${OpenCV

ROS机器人001-ROS的安装

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-12 15:14:21
首先需要在Ubuntu16.04安装ROS系统: 1.添加ROS源 sudo sh - c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' 2.添加密钥 sudo apt - key adv -- keyserver hkp : / / ha . pool . sks - keyservers . net : 80 -- recv - key 0xB01FA116 3.安装ROS sudo apt - get update sudo apt - get install ros - kinetic - desktop - full 4.初始化rosdep sudo rosdep init 5.设置环境变量 echo "source /opt/ros/kinetic/setup.bash" >> ~ / . bashrc source ~ / . bashrc 6.安装rosinstall sudo apt - get install python - rosinstall python - rosinstall - generator python - wstool build - essential

ubuntu安装ros2

早过忘川 提交于 2019-12-12 10:52:19
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> Installing ROS2 via Debian Packages ¶ Table of Contents Resources Setup Locale Setup Sources Install ROS 2 packages Environment setup (optional) Install argcomplete Sourcing the setup script Try some examples Install additional RMW implementations Install additional packages using ROS 1 packages Build your own packages Troubleshooting Debian packages for ROS 2 Dashing Diademata are available for Ubuntu Bionic. Resources ¶ Status Page: ROS 2 Dashing (Ubuntu Bionic): amd64 , arm64 Jenkins Instance Repositories Setup Locale ¶ Make sure you have a locale which

Static cast equivalent in python

流过昼夜 提交于 2019-12-12 06:19:29
问题 My problem is the following: I am using ROS and I am currently trying to read values from a PointCloud of a Kinect sensor. The values are of type PointCloud2 and PointCloud2.data holds the data of the PointCloud and is of type uint8[]. In my project I am currently using python and I have successfully registered and retrieved the data. My issue is that when trying to retrieve them python parses the uint8[] array as strings. The current part of the script where I have the problem is the

PyDev messing encoding settings when running Python script from inside Eclipse

余生长醉 提交于 2019-12-12 05:49:02
问题 I tried running the following command using subprocess.Popen() : ros_version_retrieve = subprocess.Popen(["rosversion", "-d"], shell=False, stdout=subprocess.PIPE) ros_version_retrieve.wait() rosversion is part of ROS and allows retrieving either the version of a given package by calling rosversion <package> or the version of the version of the installed ROS by calling rosversion -d . In the first case I will get a string like 1.12.3 and in the second I get kinetic (since that is the release