robot upstart 问题
1.启动后在记录文件发现左轮节点未启动:
因为左边的类未实例化,不会去订阅消息然后初始化
2.两个节点均可以启动后,发现启动后又死掉
因为在程序里有getenv(“HOME”)然后付给string,getenv返回为NULL时程序会报错死掉
3.robot upstart 的用户权限比较低,没有权限操作串口(使用chmod 777 /dev/ttyS*,重启后失效)
通过udev修改权限,具体如下:
在/etc/udev/rules.d/文件夹下添加文件50-chmod-tty.rules,内容如下:
KERNEL=="ttyS[0-9]*", SUBSYSTEM=="tty", GROUP="dialout", MODE="0666"
4.最后发现具备了操作串口的权限,但打开串口失败,修改如下:
int left_wheel_motor::UART0_Open(char *port)
{ int fdd;
fdd = open( port, O_RDWR|O_NOCTTY|O_NDELAY);
if (FALSE == fdd)
{
perror("Can't Open Serial Port");
return(FALSE);
} if(fcntl(fdd, F_SETFL, ) < ) //if and else: set as block
{
printf("fcntl failed!\n");
return(FALSE);
}
else
{
printf("fcntl=%d\n",fcntl(fdd, F_SETFL,));
} if( == isatty(STDIN_FILENO))
{
printf("standard input is not a terminal device\n");
return(FALSE);
}
else
{
printf("isatty success!\n");
}
printf("fd->open=%d\n",fdd);
return fdd;
} 改为: int left_wheel_motor::UART0_Open(char *port)
{ int fdd;
fdd = open( port, O_RDWR|O_NOCTTY);
if (FALSE == fdd)
{
perror("Can't Open Serial Port");
return(FALSE);
}
printf("fd->open=%d\n",fdd);
return fdd;
}
1. apt-get install ros_indigo_robot_upstart
2. rosrun robot_upstart install bzrobot_bringup/launch/bzrobot_base.launch
3. rosrun robot_upstart uninstall bzrobot
4. sudo service bzrobot start
5. sudo service bzrobot stop
6. sudo nano /var/log/upstart/bzrobot.log
7. sudo rm -f /var/log/upstart/bzrobot.log
robot upstart 问题的更多相关文章
- run a Freight robot (2)
3. Network Setup Connecting Freight to a Monitor The easiest way to configure the wireless networki ...
- Robot Framework用户手册 (版本:3.0)
版权信息:诺基亚网络和解决中心 本翻译尊重原协议,仅用于个人学习使用 1.开始: 1.1 介绍: Robot Framework是一个基于Python的,为终端测试和验收驱动开发(ATDD)的可扩展的 ...
- selenium webdriver 右键另存为下载文件(结合robot and autoIt)
首先感谢Lakshay Sharma 大神的指导 最近一直在研究selenium webdriver右键菜单,发现selenium webdriver 无法操作浏览器右键菜单,如图 如果我想右键另存为 ...
- RIDE -- Robot Framework setup
RobotFramework 是一款基于python 的可以实现关键字驱动和数据驱动并能够生成比较漂亮的测试报告的一款测试框架 这里使用的环境是 python-2.7.10.amd64.msi RID ...
- [8.2] Robot in a Grid
Imagine a robot sitting on the upper left corner of grid with r rows and c columns. The robot can on ...
- Robot Framework自动化测试 ---视频与教程免费分享
当我第一次使用Robot Framework时,我是拒绝的.我跟老大说,我拒绝其实对于习惯了代码的自由,所以讨厌这种“填表格”式的脚本.老大说,Robot Framework使用简单,类库丰富,还可以 ...
- 【转】Linux 初始化 init 系统 [sysvinit systemd upstart]
http://www.ibm.com/developerworks/cn/views/linux/libraryview.jsp?sort_by=&show_abstract=true& ...
- robot创建桌面图标(转载)
桌面ride图标,安装之后会自动创建(偶尔也会创建失败),创建桌面图标方法如下: 1. 新建快捷方式 在桌面右击鼠标,弹出的菜单选择 新建-快捷方式 ,然后在"请键入对象"的位置输 ...
- Robot Framework 的安装和配置(转载)
Robot Framework 的安装和配置 在使用 RF(Rebot framework)的时候需要 Python 或 Jython 环境,具体可根据自己的需求来确定.本文以在有 Python 的环 ...
随机推荐
- matplotlib学习记录 二
# 绘制10点到12点的每一分钟气温变化折线图 import random from matplotlib import pyplot as plt # 让matplotlib能够显示中文 plt.r ...
- redis的字符串操作以及在django中的使用
redis ----redis.MongoDB : 非关系型数据库 redis 存储在内存中 MongoDB 存储在硬盘中 l 简介 redis是一个key-value存储系统 , 支持持久化 ...
- ACM-ICPC 2018 沈阳赛区网络预赛 F. Fantastic Graph(有源上下界最大流 模板)
关于有源上下界最大流: https://blog.csdn.net/regina8023/article/details/45815023 #include<cstdio> #includ ...
- CodeForces 392C Yet Another Number Sequence 矩阵快速幂
题意: \(F_n\)为斐波那契数列,\(F_1=1,F_2=2\). 给定一个\(k\),定义数列\(A_i=F_i \cdot i^k\). 求\(A_1+A_2+ \cdots + A_n\). ...
- LA 7049 Galaxy 枚举
题意: \(x\)轴上有\(n\)个质量为\(1\)的点,他们的坐标分别为\(x_i\). 质心的坐标为\(\frac{\sum{x_i}} {n}\) 转动惯量为\(\sum{d_i^2}\),其中 ...
- TextView设置缩略显示
1.代码设置 textview.setSingleLine(); textview.setEllipsiz(TextUtils.TruncateAt.valueOf("END")) ...
- 关于dispatch_sync死锁问题
首先,我们来看下下面一个例子: 代码:(串行队列里同步线程嵌套) NSLog(@"haha"); dispatch_queue_t queue = dispatch ...
- 令人惊叹的sublime text 3 插件
1.ChineseLocalization------语言汉化.(新手必备) 2.SublimeTmpl------打开生成模板.(新手必备) 3.SublimeCodeIntel------代码自 ...
- [Cake] 2. dotnet 全局工具 cake
在上篇博客[Cake] 1. CI中的Cake中介绍了如何在CI中利用Cake来保持与CI/CD环境的解耦. 1. 简化cake的安装 当时dotnet 2.1还未正式发布,dotnet 还没有工具的 ...
- day04_05 逻辑运算符、表达式
num += 1 等价于 num = num + 1 逻辑运算符 and 全true则true 条件1 and 条件2 5>3 and 3>2 ===> true 5> ...