ros

如何找bug

心不动则不痛 提交于 2020-01-17 01:07:59
将发送端sleep时间定为0, 即sleep(0). 事例率也在700Hz持续3分钟后降为0.查看log文件: 1. SFI 的log文件: WARNING 2017-Feb-08 15:39:55 [DC::StatusWord EventAssembly::EventCompleted(...) at SFI/src/EventAssembly.cxx:480] Problem with the flow of data: Event with LVL1ID 130745 misses 1 data fragment(s) from: ROS-Eth-07, WARNING 2017-Feb-08 15:39:55 [DC::StatusWord EventAssembly::EventCompleted(...) at SFI/src/EventAssembly.cxx:480] Problem with the flow of data: Event with LVL1ID 130749 misses 1 data fragment(s) from: ROS-Eth-07, WARNING 2017-Feb-08 15:39:55 [DC::StatusWord EventAssembly::EventCompleted(...) at SFI/src

ImportError: /opt/ros/kinetic/lib/python2.7/dist-packages/cv2.so: undefined symbol: PyCObject_Type

寵の児 提交于 2020-01-16 18:51:18
Anaconda 安装opencv和Ros的opencv冲突问题,报错: ImportError: /opt/ros/kinetic/lib/python2.7/dist-packages/cv2.so: undefined symbol: PyCObject_Type 解决方法参考以下 链接 : https://blog.csdn.net/qq_34544129/article/details/81946494 来源: CSDN 作者: fzu_zhengbinchen 链接: https://blog.csdn.net/qq_26894673/article/details/104008211

How to launch a node with a parameter in ROS2?

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-16 08:57:31
问题 Migrating ros1 package to ros2 and couldn't figure how to launch with a paramter in ros2. With ros1 I have a launch file that refers to a config file and from cpp code I use node.getParam launch file: <launch> <arg name="node_name" default="collector" /> <arg name="config_file" default="" /> <node name="$(arg node_name)" pkg="collector" type="collector" respawn="true"> <rosparam if="$(eval config_file!='')" command="load" file="$(arg config_file)"/> </node> </launch> config file: my_param: 5

ros学习指南

笑着哭i 提交于 2020-01-16 01:45:42
Turtlebot https://blog.csdn.net/hongliang2009/article/details/73274966 http://wiki.ros.org/turtlebot/Tutorials/indigo/Turtlebot%20Installation https://github.com/lazyparser/weloveinterns/wiki/ros-checklist 学习 http://wiki.ros.org/turtlebot/Tutorials/indigo http://edu.gaitech.hk/turtlebot/speech-doc.html 导航 自主导航 http://wiki.ros.org/turtlebot_navigation/Tutorials/indigo/Autonomously%20navigate%20in%20a%20known%20map 跟随 http://wiki.ros.org/turtlebot_follower/Tutorials/Demo 修改地图参数 http://wiki.ros.org/turtlebot_stage/Tutorials/indigo/Customizing%20the%20Stage%20Simulator gazebo: http://wiki.ros.org

ros机器人之小乌龟仿真-路径记录

眉间皱痕 提交于 2020-01-15 14:33:48
------------恢复内容开始------------ 通过自己不断地摸索,对ros系统有了一定的了解,首先装系统,这一过程中也遇到了很多问题,但通过不断地尝试,经过一天一夜的倒腾,总算是把系统给安装好了,接下来配置环境,虽然这个过程比较艰辛,总是出现编译出错或者没有功能包依赖等各种问题。但是通过我们的努力,都一点一点的解决了,我会再接再厉, 1.首先运行个小乌龟例程:   打开一个终端: roscore          #运行ros环境   打开一个终端: rosrun turtlesim turtlesim_node        #运行小乌龟仿真器节点,打开小乌龟运行场景   打开一个终端:rosrun turtlesim turtle_teleop_key            #运行键盘控制节点,通过方向键控制小乌龟的运动 2.通过话题给小乌龟发送消息让小乌龟定向运动 命令如下 qqtsj  ~  rostopic pub /turtle1/cmd_vel geometry_msgs/Twist "linear: x: 3.0 y: 0.0 z: 2.0 angular: x: 0.0 y: 0.0 z: 0.0" publishing and latching message. Press ctrl-C to terminate

ROS publishing array from python node

只谈情不闲聊 提交于 2020-01-15 08:36:45
问题 I'm new to ros+python and i'm trying to publish a 1-D array from python ros node. I used Int32MultiArray but i cant understand the concept of layout in multiarray. Can anyone explain it to me? or is there any other way of publishing an array ? Thanks. #!/usr/bin/env python import roslib roslib.load_manifest('test_drone') import numpy import rospy import sys import serial from std_msgs.msg import String,Int32,Int32MultiArray,MultiArrayLayout,MultiArrayDimension from rospy.numpy_msg import

ROS节点

对着背影说爱祢 提交于 2020-01-15 07:31:24
ROS节点介绍 在ROS的世界里,最小的进程单元就是节点(node) 一个软件包里可以有多个可执行文件,可执行文件在运行之后就成了一个进程(process),这个进程在ROS中就叫做节点 从程序角度来说,node就是一个可执行文件(通常为C++编译生成的可执行文件、Python脚本)被执行,加载到了内存之中 从功能角度来说,通常一个node负责者机器人的某一个单独的功能。由于机器人的功能模块非常复杂,我们往往不会把所有功能都集中到一个node上,而会采用分布式的方式,把鸡蛋放到不同的篮子里 例如有一个node来控制底盘轮子的运动,有一个node驱动摄像头获取图像,有一个node驱动激光雷达,有一个node根据传感器信息进行路径规划,这样做可以降低程序发生崩溃的可能性,试想一下如果把所有功能都写到一个程序中,模块间的通信、异常处理将会很麻烦。 主节点 由于机器人的元器件很多,功能庞大,因此实际运行时往往会运行众多的node,负责感知世界、控制运动、决策和计算等功能。 那么如何合理的进行调配、管理这些node?这就要利用ROS提供给我们的 节点管master ,master在整个网络通信架构里相当于管理中心,管理着各个node node首先master处进行注册,之后master会将该node纳入整个ROS程序中 node之间的通信也是先由master进行“牵线”

How can I embed another software in my qt window in Linux?

青春壹個敷衍的年華 提交于 2020-01-14 05:40:17
问题 I would like to create a GUI using pyqt5 and qt designer for a robot controlling system in Ubuntu. This GUI should have two QTabWidget. Tab1 is for the setting of the parameters and some other functions. Tab2 is to embed a software "rviz", which is a software in ROS to see the model of a robot (We can run it by typing "$ rosrun rviz rviz" in terminal). When I run this GUI script, the rviz should also be run in the Tab2. The expected outcome please see the following pictures. Tab1 Tab2 Tab1 is

ROS time stamp and sync

♀尐吖头ヾ 提交于 2020-01-14 03:12:21
1. https://answers.ros.org/question/189867/what-is-the-timestamp/ In ROS messages timestamp is taken from your system, which is unix epoch time . Check Unix epoch time here. For synchronisation look message_filters Documentaiton of the datatypes are at: http://wiki.ros.org/rospy/Overview/Time and http://wiki.ros.org/rospy/Overview/Time link Comments Also, if the workstation and the device are significantly off, you can sync the two with chrony . Just mentioning because it took me too long to figure out... 2. The Unix epoch (or Unix time or POSIX time or Unix timestamp ) is the number of

“cv2.imdecode(numpyArray, cv2.CV_LOAD_IMAGE_COLOR)” returns None

这一生的挚爱 提交于 2020-01-14 03:05:13
问题 I'm trying to convert an image into Opencv (into numpy array) and use the array to publish the message over a ROS node. I tried doing the same through the following code fig.canvas.draw() nparr = np.fromstring ( fig.canvas.tostring_argb(), np.uint8 ) print nparr img_np = cv2.imdecode(nparr, cv2.CV_LOAD_IMAGE_COLOR) print img_np image_message = bridge.cv2_to_imgmsg(img_np, encoding="passthrough") pub.publish(image_message) But, when I tried doing this I get an error message AttributeError: