ros

ubuntu16.04+ros安装时报错epends: ros-kinetic-robot but it is not going to be installed

余生长醉 提交于 2019-12-15 02:05:16
编译其他时由于版本冲突卸载了一些库,发现ros不能用了,重装时报错: sudo apt-get install ros-kinetic-desktopReading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: ros-kinetic-desktop : Depends: ros-kinetic-robot but it is not going to be installed Depends:

ROS操作系统基本命令汇总

五迷三道 提交于 2019-12-15 01:05:19
【1】在使用ROS发布或者订阅消息之前,必须要使用命令 roscore 将这个ROS内核启动才行; 【2】当编写好相关文件之后,一定要返回到ROS工程目录下,进行编译,具体操作是: $ cd ~ / catkin_ws $ catkin_make $ source ~ / catkin_ws / devel / setup . bash 【3】当使用roscd 语句提示:无法找到相应的ros包的时候,采用 echo "export ROS_PACKAGE_PATH"=~/ <文件名> /:"$ROS_PACKAGE_PATH " >> ~/.bashrc 问题就可以得到解决 【4】一般而言,一个ROS工作空间包括: -(1)src 文件夹: 一般包括ROS包(launch文件+msg文件+src文件+srv文件+头文件)+CMakeLists.txt文件+package.xml文件 -(2)build 文件夹:用来存放编译过程的文件 -(3)devel 文件夹:用来存放目标文件(如setup.bash) ROS文件空间的基本组成 ROS包的基本组成 【5】node是ROS操作系统中的最小单位,当我们需要打开多个node节点的时候会,我们必须采用master来进行管理。 roscore //表示启动ros的master节点 【6】rosrun语句的基本命令格式为: $ rosrun

ros msg文件数组定义与使用

我是研究僧i 提交于 2019-12-14 01:36:00
float32[] ranges 注意这里的数组使用的是无长度限制的,也就是方扩号内没有东西。在使用的时候,不能够直接用数组赋值那样去做,它实际上是一个向量,往里面填充数据应使用c++中vector的push_back、resize之类的函数。参见官方教程中laserscan的发布,laserscan消息中的ranges就是这样一个向量,在程序中laserscan是使用的resize先设定容器大小,再往里填充数据的. 1 #include <ros/ros.h> 2 #include <sensor_msgs/LaserScan.h> 3 4 int main(int argc, char** argv){ 5 ros::init(argc, argv, “laser_scan_publisher”); 6 7 ros::NodeHandle n; 8 ros::Publisher scan_pub = n.advertise<sensor_msgs::LaserScan> (“scan”, 50); 9 10 unsigned int num_readings = 100; 11 double laser_frequency = 40; 12 double ranges[num_readings]; 13 double intensities[num_readings]; 14

QtCreator与catkin命令两种方式开发ROS程序

你说的曾经没有我的故事 提交于 2019-12-14 01:20:08
QtCreator与catkin命令两种方式开发ROS程序 一、Qt Creator安装及开发ROS 1.安装Qt Creator 2.使用Qt Creator开发ROS 1.创建工作空间 2.创建程序包 3.创建节点 4.编译 5.运行 二、使用catkin命令开发ROS程序 1.创建工作空间 2.创建程序包 3.在目录src添加程序文件 4.编译配置CMakeLists.txt 5.程序包配置package.xml 6.利用catkin进行编译安装 7.运行 最近学习无为斋主的《机器人ROS开发实践》的ROS编程部分,编译运行遇到了一些麻烦,所以记录下来,以免忘记和方便他人学习。 ROS编译运行有两种方式:1、用IDE开发工具Qt Creator来创建ROS程序;2、通过命令行使用catkin编译工具创建ROS程序。首先介绍第一种方式。 一、Qt Creator安装及开发ROS 1.安装Qt Creator 本次试验基于Ubuntu 18.04 LTS,Ubuntu系统库自带的qtcreator并没有ROS插件,需要自己通过ppa方式安装,网上多是基于14.04版本的,且较为繁琐,并不推荐。这里要介绍的是带有ROS插件的Qt Creator安装,链接如下: ros-qtc-plugin How to Install (Users) 官网有两种安装方式:在线和线下。在线安装非常慢

How to feed the data obtained from rospy.Subscriber data into a variable?

自作多情 提交于 2019-12-13 17:43:58
问题 I have written a sample Subscriber. I want to feed the data that I have obtained from the rospy.Subscriber into another variable, so that I can use it later in the program for processing. At the moment I could see that the Subscriber is functioning as I can see the subscribed values being printed when I use rospy.loginfo() function. Although I donot know how to store this data into another varible. I have tried assigning it directly to a variable by using assignment operator '=', but I get

"Supertypes of the following classes cannot be resolved.” in Task:app:buildInfoGeneratorDebug

会有一股神秘感。 提交于 2019-12-13 17:22:13
问题 I can't compile my Android Kotlin Project because I get the following 'Kotlin compiler' error when gradle compiles: Supertypes of the following classes cannot be resolved. Please make sure you have the required dependencies in the classpath: class sensor_msgs.CompressedImage, unresolved supertypes: org.ros.internal.message.Message> Task:app:buildInfoGeneratorDebug This is a simple test project that has the bare minimum code. The main difference between a regular android app. and this one is

How do I run an Answer Set Programming file from a C++ File?

淺唱寂寞╮ 提交于 2019-12-13 11:26:40
问题 What methods are there that I can use to run an ASP file from the main function of my C++ code? I'm doing a project in which I am expected to control a simulated turtlebot using a C++ file, and use ASP code to construct an action plan that the robot can use to achieve a specified goal. I'm using Ubuntu 14.04, SPARC (an ASP solver), ROS indigo, and gazebo. 回答1: Am I correct that SPARC is implemented in Java (this link)? If this is the case, there are quite a few options: You can use Java

Access GPIO pins of Raspberry Pi 2 with ROS

我是研究僧i 提交于 2019-12-13 07:13:34
问题 I'm trying to access the GPIO pins of a Raspberry Pi 2 using the robot operating systen ROS. I know, there are many tutorials on this topic. But my problem is as follows: The recommended Linux distribution for ROS is Ubuntu . Since there are other Ubuntu machines in the ROS network, I'd like to avoid compiling ROS for a different OS. In Ubuntu the /sys/class/gpio sysfs is not enabled by default. I'd need to recompile the kernel with a custom configuration. If I can't use /sys/class/gpio , it

CMake link atlas and llapack

左心房为你撑大大i 提交于 2019-12-13 06:26:49
问题 How do I tell the compiler, in CMake where a specific library is? For example, using terminal the following works: g++ main.cpp hmm.cpp -I /usr/include/atlas -L /usr/lib64/atlas/ -llapack -lblas But, how do I include the following inside of my CMake file? I am using the ROS operating system and currently have: rosbuild_add_executable(build src/hmm.cpp) 回答1: The traditional way of finding libraries is to use find_package. It is often necessary to provide a FindLIBNAME. For LAPACK, CMake

ROS学习笔记(一)

余生长醉 提交于 2019-12-13 03:53:12
ROS学习笔记(一) 一、配置系统软件源 二、安装ROS 最近打算在机器人平台上研究视觉SLAM,因此需要学习一下ROS,特意在这里开个博客记录一下自己的学习过程,分享给大家 2019-12-09 一、配置系统软件源 在网上看了很多的教程,提示都需要将ubuntu自带的软件源换成国内源,但是我发现换源之后会有很多的小问题更新,例如出现在 sudo apt-get update 后会出现无法定位软件包等一系列的问题,因此建议还是使用ubuntu官方源,毕竟官方的支持度和代码库我个人来看是最好的。 配置系统软件源如下 确保配置如上图,接下来用下面的命令加入ROS官方的软件源 sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $( lsb_release -sc ) main" > /etc/apt/sources.list.d/ros-latest.list' 软件源添加成功之后开始添加密钥 sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116 密钥添加成功后就可以开始安装ROS 二、安装ROS 更新软件源信息 sudo apt-get