ros

Robotics: Move multiple turtlebots separately

本秂侑毒 提交于 2019-12-11 18:33:54
问题 I want to launch multiple turtlebots using Gazebo, and move each one from them separately with cmd_vel_mux topic. Namely, I would like to send message to topic {robot_name)/cmd_vel_mux . However, I have just publishers to these topics in my code (because I have code that each robot runs that publishers to this topic). But, I have no subscribers to these topics. Therefore, gazebo is launched but the robots doesn't move. I tried to launch mobile_base_nodelet_manager from ros nodelet package for

ROS 2参数-parameters-

点点圈 提交于 2019-12-11 18:16:34
前序: ROS 2服务-services- 本节详细介绍参数param 1. 如何理解参数param: 参数是节点的配置值。 可以将参数视为节点设置。 节点可以将参数存储为整数,浮点数,布尔值,字符串和列表。 在ROS 2中,每个节点都维护自己的参数。 所有参数都是可以动态重新配置的,并且是基于ROS 2服务构建的。 2. 参数param有哪些命令功能: ros2 param -h 命令有: delete:删除参数 describe:显示有关已声明参数的描述性信息 dump:将节点的参数转储到Yaml文件中 get:获取参数 list:列出可用参数表 set:设置参数 3. 参数命令实践 如之前一样,先开启: ros2 run turtlesim turtlesim_node ros2 run turtlesim turtle_teleop_key 3.1 参数列表 列出每个节点的参数: ros2 param list 每个节点都有参数use_sim_time;它不是turtlesim特有的。 根据它们的名称,/turtlesim的参数看起来像是使用RGB颜色值来确定turtlesim窗口的背景色。 要确定参数类型,可以使用ros2 param get。 3.2 参数获取 使用如下命令获取当前参数值: ros2 param get <node_name> <parameter

Cannot create custom message

孤街浪徒 提交于 2019-12-11 17:39:59
问题 Hi i am currently trying to create a custom message for an exisitng package however i create Point_id.msg but when i included it as a header file in my code, i receive the following error /home/111/222/333/find_object_2d/src/objects_detected.cpp:7:41: fatal error: find_object_2d/PointObjects.h: No such file or directory compilation terminated. make[2]: *** [find_object_2d/CMakeFiles/objects_detected.dir/src/objects_detected.cpp.o] Error 1 make[1]: *** [find_object_2d/CMakeFiles/objects

Problem with the installation of dji-osdk on raspberry pi 3 for dji matrice 100

て烟熏妆下的殇ゞ 提交于 2019-12-11 16:54:14
问题 I have a raspberry pi 3 with ubuntu mate 16.04 on it and i installed ROS. I'm following this guide to install the osdk on the raspberry. At point 6, when i type catkin_make the raspberry freezes at 94% and doesn't finish the compilation (i think that is because raspberry runs out of ram). How can i do? 回答1: Adding swap space would allow the Raspberry Pi to use the SD Card as extra memory. Accessing this memory will be very slow, but it can be useful in cases like this. To create a swapfile

ROS安装

穿精又带淫゛_ 提交于 2019-12-11 16:30:09
ROS安装 1. 教程 2. 安装步骤 1. 教程 wiki 2. 安装步骤 配置Ubuntu仓库:打开<系统设置>选择<软件和更新>,确保restricted、universe和multiverse被选中 设置软件源:打开终端输入: 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 更新系统软件:在终端输入: sudo apt-get update 安装ROS kinetic桌面完整版:在终端输入: sudo apt-get install ros-kinetic-desktop-full 初始化ROS:在终端分别输入: sudo rosdep init rosdep update (第二步容易出错。如果出错,可以跳过) 8. 设置环境:在终端分别输入: echo "source /opt/ros/kinetic/setup

Publisher/Subscriber issues when using rostopic pub

吃可爱长大的小学妹 提交于 2019-12-11 16:07:33
问题 I am working with a simulated bebop 2 ,these are the commands I am using to run the simulation. sphinx /opt/parrot-sphinx/usr/share/sphinx/drones/bebop2.drone roslaunch bebop_driver bebop_node.launch ip:=10.202.0.1 When using the following command I am able to move the drone succesfuly rostopic pub -r 10 cmd_vel geometry_msgs/Twist '{linear: {x: 0.0, y: 0.0, z: 0.0}, angular: {x: 0.0,y: 0.0,z: 0.0}}' What Im trying to do is to move the drone with the python script I am showing below. #!/usr

making a laser detector have an error in my code

有些话、适合烂在心里 提交于 2019-12-11 16:06:34
问题 I am making a program that detects lasers and circles and numbers then with the opencv library. This is my first time using ros indigo and I don't really know what I am doing but I am getting an error that is repeating at a rapid rate when I run my program. this is the error I am getting: [ERROR] [WallTime: 1565273888.861720] bad callback: Traceback (most recent call last): File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/topics.py", line 720, in _invoke_callback cb(msg) File "lazer3

Run an active window inside an PyQT5 GUI application

≡放荡痞女 提交于 2019-12-11 15:29:36
问题 I'm using PyQT5, and I want to run an external window inside an TabWidget, something similar to that, but this example is for windows only, and i want to run in a linux (Ubuntu 14.04) os. I also find a similar problem in this thread but the answers didn't work. Also tried the solution here but didn't work either. Is possible to embed an terminal, like this code, but i have no idea how to do the same with the RViz command. I have some code bellow, who uses wmctrl to pick the RViz (the

ROS常用包(一) fake_localization

只愿长相守 提交于 2019-12-11 13:32:27
wiki是最好的学习资料,以下直接参考了wiki官网。另外po出官网网址,建议英语较好的朋友之接看原版 http://wiki.ros.org/fake_localization 概述 fake_localization 包提供一个单一的节点 fake_localization ,相当于AMCL定位的ROS API接口 。 在仿真过程中,此节点最常用,以一种提供完美定位且方便实用的算法。 具体来说, fake_localization通过AMCL算法 将 里程 数据转换为pose点和particle cloud点云 。 AMCL是一套常用的仿真定位算法,可自行google。 节点fake_localization 订阅的topics base_pose_ground_truth ( nav_msgs/Odometry ) 仿真中发布的机器人位置 initialpose ( geometry_msgs/PoseWithCovarianceStamped ) 允许使用像rviz或nav_view这样的工具来设置fake_localization的自定义位姿。 发布的topics amcl_pose ( geometry_msgs/PoseWithCovarianceStamped ) 仿真中的pose点姿态。 particlecloud ( geometry_msgs

ros学习

南楼画角 提交于 2019-12-11 10:45:25
ros第一天 教材《ROS机器人开发实践》-胡春旭 CTRL+alt+T打开终端 rm -r learning_com删除目录文件夹 第三章ros基础 一、创建并配置工作空间(workspace)   1、创建工作空间     mkdir -p ~/catkin_ws/src    #在home目录下创建两级目录,先创建catkin目录,再创建src目录,必须使用-p选项     cd ~/catkin_ws/src     #切换到src目录     catkin_init_workspace    #初始化工作空间   2、编译工作空间,此时工作空间为空,经过编译会生成很多文件,严格来说是迁移来很多文件     cd ~/catkin_ws/     catkin_make   #catkin自己的编译命令   3、初始化环境变量,使环境变量生效     source devel/setup.bash #其实就是运行编译生成的devel目录下的setup.bash文件   4、验证环境变量是否有效     echo R O S P A C K A G E P A T H   注 : 此 时 s o u r c e 只 在 当 前 终 端 有 效 , 若 想 环 境 变 量 所 有 终 端 都 有 效 需 要 改 环 境 变 量 设 置 : − m a c h i n e : /