ros

I'm trying to publish a message of a Tizen based app on ros using rosbridge and i get an error

二次信任 提交于 2019-12-12 05:16:16
问题 as the title says, I'm trying to publish a message on ros using rosbridge, because my app is written in javascript. Basically i want to cast a stream of heart rate data on a pc running ros to so some elaboration. The app is running on a Tizen based smartwatch. If i try to publish geometry messages, like the device orientation, i have no problem and they are published on ros. I tried the sensor message type (channelfloat32 in particular) to cast the stream of the heart rate with no success. I

ROS 2行动-actions-

自古美人都是妖i 提交于 2019-12-12 04:43:34
前序: ROS 2参数-parameters- 本节详细介绍行动action。 1. 如何理解行动action: 行动action是ROS 2中用于长时间运行任务的通信类型之一。 它由三部分组成:目标,结果和反馈。 行动基于主题和服务。 它们的功能与服务相似,但行动是可抢占的模式(即,可以在执行时将其取消)。 与返回单个响应的服务不同,它们还提供稳定的反馈(过程状态反馈)。 行动使用客户端-服务器端模型,类似于发布者-订阅者模型(已经在主题教程中进行了介绍)。 “行动客户端”节点将目标发送到“行动服务器”节点,该节点确认目标并返回反馈流和一个结果。 2. 行动action有哪些命令功能: ros2 action -h 命令如下: info:显示行动具体信息 list:输出行动名列表 send_goal:发送行动目标 show:显示行动类型定义 行动消息格式如下: # The desired heading in radians float32 theta --- # The angular displacement in radians to the starting position float32 delta --- # The remaining rotation in radians float32 remaining 主题消息,没有--- 服务消息,一个--- 行动消息

ROS 创建及使用msg和srv

别来无恙 提交于 2019-12-12 04:28:36
1. 什么是msg文件和srv文件 1.1 msg文件 msg是一个简单的txt文件,每行定义一个信息域。其格式为: 类型 名称 类型 包括: int8, int16, int32, int64 (plus uint*) float32, float64 string time, duration other msg files 可变长度array[ ] and 固定长度array[C] Header(包含一个timestamp和坐标系信息) 事例: string s int16 n 1.2 src文件 src文件与msg文件的内容相似,区别在于其包括 请求 和 响应 两部分(两部分用- - -分隔)。 事例: int8 a //请求 int8 b //请求 -- -- -- int8 c //响应 2. 创建和编译msg文件和srv文件 2.1 创建msg文件 顾上一章,创建了一个名为work的工作空间,其下有devel目录、build目录以及src目录。在src目录下包含myros的功能包和CMakeList.txt文件。此时myros功能包包括include目录、src目录、CMakeList.txt文件和package.xml文件。msg目录就要创建在myros功能包下。 $ cd work / src / myros //切换到相关目录下 $ mkdir msg /

How to use a bash script to run multiple non-ending commands on Linux using Tmux

半世苍凉 提交于 2019-12-12 04:24:02
问题 I had a .txt script that was running fine, opening several screen windows and running several commands. Then, I added a new line, saved it, ran the script and it no longer works. I decided to put it back to how it was, but it still does not work, and the code is exactly the same as before. I have heard that screen is very buggy and no longer supported, so I guess it is because of that. This is the code: screen -t ur10_server 0 stuff "cd ~/catkin_ws; source devel/setup.bash; " stuff "roslaunch

ros can't find OpenCV , the path /usr/local/

随声附和 提交于 2019-12-12 03:28:29
问题 I am working with ros and OpenCV. I installed OpenCV in the default path /usr/local , but when I build programs with catkin_make in my workstation, it shows Project cv_bridge specifies /usr/include/opencv as an include dir, which is not found. Can you show me what can I do to solve the problem? Thank you. 回答1: I recommend you use the opencv2_catkin package that automatically finds and links your package to OpenCV. As per the Readme, just add the following dependency to your own package:

ROS with QtCreator: autocompletion

感情迁移 提交于 2019-12-12 03:22:28
问题 I'm using and like QtCreator to code and build my ROS projects written in c++ . Unfortunately the auto-completion for my own header files is not working: e.g. #include "LineTracker.hh" Building the project works perfectly. And also the auto-completion for other external packages like ros or opencv is working. Update 2.0: With QtCreator 3.6 the solution is not working Update 1.0: Found a solution, see bottom! Thats how my CMakeLists.txt looks: cmake_minimum_required(VERSION 2.8.3) project(line

Subscribing and publishing geometry/Twist messages from Turtlesim

自闭症网瘾萝莉.ら 提交于 2019-12-12 02:43:42
问题 I'm working on an exercise that uses the Turtlesim tool. I have to create a node vel_filter that subscribes to messages published by the pubvel node (from the book A Gentle Introduction to Ros by O'Kane) and immediately republish only those messages who have positive angular velocity. The pubvel code is given below: #include <ros/ros.h> #include <geometry_msgs/Twist.h> #include <stdlib.h> int main(int argc, char**argv){ ros::init(argc, argv, "publish_velocity"); ros::NodeHandle nh; ros:

Rosbag reader in qtcreator

北慕城南 提交于 2019-12-12 02:13:06
问题 I try to make a rosbag reader in Qtcreator. I create a project and I just want to read informations inside the bag. Here is my pro file: QT += core QT -= gui CONFIG += c++11 TARGET = ROSBag_Reader CONFIG += console CONFIG -= app_bundle TEMPLATE = app LIBS += -lboost_system LIBS+= -lpthread LIBS+= -L/usr/lib/x86_64-linux-gnu LIBS+= -ltf2_ros LIBS+= -lrostime LIBS+= -lrospack LIBS+= -lroslz4 LIBS+= -lroslib LIBS+= -lroscpp_serialization LIBS+= -lroscpp LIBS+= -lrosconsole_print LIBS+=

Parallel Processing on Python [duplicate]

强颜欢笑 提交于 2019-12-12 00:10:25
问题 This question already has answers here : How can I use threading in Python? (19 answers) Dead simple example of using Multiprocessing Queue, Pool and Locking (5 answers) Closed 3 years ago . I am a beginner in python and multiprocessing so if the question seems naive please forgive me. I have two functions that I want to run at the same time. One is an openCV implementation of face recognition and the other is a standard python code. def main(): does(s) # a function call def face(): recog

Can a ROS node be created outside a catkin workspace?

拈花ヽ惹草 提交于 2019-12-11 21:12:22
问题 I want to create a ROS publisher node outside a catkin workspace. Can it be created? 回答1: Of course you can. Treat ROS like any other cpp library or python package. In python you have to keep PYTHONPATH environment variable pointing to ros packages in /opt/ros/kinetic/lib/python2.7/dist-packages . In cpp you have to tell compiler where to look for includes ( /opt/ros/kinetic/include ), libraries ( /opt/ros/kinetic/lib ) and which library to import. For the simplest application -lroscpp