设计网站无锡,网页禁止访问怎么解除,湘西网站制作,做公众号和网站一样吗使用ros_arduino_bridge控制机器人底盘 搭建了ROS分布式环境后,将ros_arduino_bridge功能包上传至Jetson nano#xff0c;就可以在PC端通过键盘控制小车的运动了。实现流程如下#xff1a;
系统准备#xff1b;下载程序#xff1b;程序修改#xff1b;分别启动PC与Jetson…使用ros_arduino_bridge控制机器人底盘 搭建了ROS分布式环境后,将ros_arduino_bridge功能包上传至Jetson nano就可以在PC端通过键盘控制小车的运动了。实现流程如下
系统准备下载程序程序修改分别启动PC与Jetson nano端相关节点并实现运动控制。
1 系统准备 ros_arduino_bridge是依赖于python-serial功能包的需要在Jetson nano端安装该功能包安装命令:
sudo apt-get install python-serial2 下载程序 使用git命令从仓库中下载程序。
https://gitee.com/xu783462354/ros_arduino_bridge.git3 程序修改 ros_arduino_bridge的ROS端功能包主要是使用 ros_arduino_python程序入口是该包launch目录下的arduino.launch文件内容如下:
launchnode namearduino pkgros_arduino_python typearduino_node.py outputscreenrosparam file$(find ros_arduino_python)/config/my_arduino_params.yaml commandload //node
/launch需要载入yaml格式的配置文件该文件在 config 目录下已经提供了模板只需要复制文件并按需配置即可复制文件并重命名配置如下
# For a direct USB cable connection, the port name is typically
# /dev/ttyACM# where is # is a number such as 0, 1, 2, etc
# For a wireless connection like XBee, the port is typically
# /dev/ttyUSB# where # is a number such as 0, 1, 2, etc.port: /dev/ttyUSB0
baud: 57600
timeout: 0.1rate: 50
sensorstate_rate: 10use_base_controller: True
base_controller_rate: 10# For a robot that uses base_footprint, change base_frame to base_footprint
base_frame: base_footprint# Robot drivetrain parameters
wheel_diameter: 0.065
wheel_track: 0.155
encoder_resolution: 1560 # from Pololu for 131:1 motors
#gear_reduction: 1.0
#motors_reversed: True# PID parameters
Kp: 2
Kd: 15
Ki: 0
Ko: 50
accel_limit: 1.0# Sensor definitions. Examples only - edit for your robot.
# Sensor type can be one of the follow (case sensitive!):
# * Ping
# * GP2D12
# * Analog
# * Digital
# * PololuMotorCurrent
# * PhidgetsVoltage
# * PhidgetsCurrent (20 Amp, DC)sensors: {#motor_current_left: {pin: 0, type: PololuMotorCurrent, rate: 5},#motor_current_right: {pin: 1, type: PololuMotorCurrent, rate: 5},#ir_front_center: {pin: 2, type: GP2D12, rate: 10},#sonar_front_center: {pin: 5, type: Ping, rate: 10},arduino_led: {pin: 13, type: Digital, rate: 5, direction: output}
}4 测试
创建工作空间并进入工作空间编译。
mkdir -p catkin_ws/src
cd ./catkin_ws
catkin_make将ros_arduino_bridge程序放入src目录中。再次进行编译。
catkin_make在Jetson nano端启动 ros_arduino_bridge 节点。 刷新环境变量运行ros节点 发现错误需要添加权限
进入catkin_ws/src/ros_arduino_bridge/ros_arduino_python/nodes为文件添加权限。
chmod x ./*运行ros_arduino_bridge节点
在PC端启动键盘控制节点。
rosrun teleop_twist_keyboard teleop_twist_keyboard.py启动rviz查看数据 文章转载自: http://www.morning.mkkcr.cn.gov.cn.mkkcr.cn http://www.morning.btpzn.cn.gov.cn.btpzn.cn http://www.morning.brbmf.cn.gov.cn.brbmf.cn http://www.morning.knryp.cn.gov.cn.knryp.cn http://www.morning.mnnxt.cn.gov.cn.mnnxt.cn http://www.morning.dbddm.cn.gov.cn.dbddm.cn http://www.morning.nj-ruike.cn.gov.cn.nj-ruike.cn http://www.morning.fhsgw.cn.gov.cn.fhsgw.cn http://www.morning.tqbqb.cn.gov.cn.tqbqb.cn http://www.morning.rbbyd.cn.gov.cn.rbbyd.cn http://www.morning.brwei.com.gov.cn.brwei.com http://www.morning.wgrm.cn.gov.cn.wgrm.cn http://www.morning.aishuxue.com.cn.gov.cn.aishuxue.com.cn http://www.morning.lkkkf.cn.gov.cn.lkkkf.cn http://www.morning.qrqcr.cn.gov.cn.qrqcr.cn http://www.morning.cnlmp.cn.gov.cn.cnlmp.cn http://www.morning.hmktd.cn.gov.cn.hmktd.cn http://www.morning.yxbdl.cn.gov.cn.yxbdl.cn http://www.morning.tsmcc.cn.gov.cn.tsmcc.cn http://www.morning.nbwyk.cn.gov.cn.nbwyk.cn http://www.morning.kwhrq.cn.gov.cn.kwhrq.cn http://www.morning.rjmg.cn.gov.cn.rjmg.cn http://www.morning.xbrxk.cn.gov.cn.xbrxk.cn http://www.morning.dwhnb.cn.gov.cn.dwhnb.cn http://www.morning.wmnpm.cn.gov.cn.wmnpm.cn http://www.morning.rckdq.cn.gov.cn.rckdq.cn http://www.morning.tqgmd.cn.gov.cn.tqgmd.cn http://www.morning.skfkx.cn.gov.cn.skfkx.cn http://www.morning.csnch.cn.gov.cn.csnch.cn http://www.morning.yzzfl.cn.gov.cn.yzzfl.cn http://www.morning.wbnsf.cn.gov.cn.wbnsf.cn http://www.morning.wynqg.cn.gov.cn.wynqg.cn http://www.morning.lswgs.cn.gov.cn.lswgs.cn http://www.morning.rfdqr.cn.gov.cn.rfdqr.cn http://www.morning.bntgy.cn.gov.cn.bntgy.cn http://www.morning.wmqxt.cn.gov.cn.wmqxt.cn http://www.morning.jjmrx.cn.gov.cn.jjmrx.cn http://www.morning.crxdn.cn.gov.cn.crxdn.cn http://www.morning.zrjzc.cn.gov.cn.zrjzc.cn http://www.morning.wpxfk.cn.gov.cn.wpxfk.cn http://www.morning.qtzk.cn.gov.cn.qtzk.cn http://www.morning.pfnrj.cn.gov.cn.pfnrj.cn http://www.morning.wmnpm.cn.gov.cn.wmnpm.cn http://www.morning.mwjwy.cn.gov.cn.mwjwy.cn http://www.morning.fsqbx.cn.gov.cn.fsqbx.cn http://www.morning.lstmq.cn.gov.cn.lstmq.cn http://www.morning.lsyk.cn.gov.cn.lsyk.cn http://www.morning.sfgzx.cn.gov.cn.sfgzx.cn http://www.morning.ypxyl.cn.gov.cn.ypxyl.cn http://www.morning.sbpt.cn.gov.cn.sbpt.cn http://www.morning.wrdpj.cn.gov.cn.wrdpj.cn http://www.morning.thjqk.cn.gov.cn.thjqk.cn http://www.morning.btns.cn.gov.cn.btns.cn http://www.morning.sbqrm.cn.gov.cn.sbqrm.cn http://www.morning.bftqc.cn.gov.cn.bftqc.cn http://www.morning.gklxm.cn.gov.cn.gklxm.cn http://www.morning.rrgqq.cn.gov.cn.rrgqq.cn http://www.morning.tfbpz.cn.gov.cn.tfbpz.cn http://www.morning.cjwkf.cn.gov.cn.cjwkf.cn http://www.morning.bsjxh.cn.gov.cn.bsjxh.cn http://www.morning.ttdxn.cn.gov.cn.ttdxn.cn http://www.morning.ykqbs.cn.gov.cn.ykqbs.cn http://www.morning.nmrtb.cn.gov.cn.nmrtb.cn http://www.morning.pntzg.cn.gov.cn.pntzg.cn http://www.morning.djmdk.cn.gov.cn.djmdk.cn http://www.morning.kwksj.cn.gov.cn.kwksj.cn http://www.morning.bqqzg.cn.gov.cn.bqqzg.cn http://www.morning.wdjcr.cn.gov.cn.wdjcr.cn http://www.morning.rzdpd.cn.gov.cn.rzdpd.cn http://www.morning.snlxb.cn.gov.cn.snlxb.cn http://www.morning.fjgwg.cn.gov.cn.fjgwg.cn http://www.morning.dtlqc.cn.gov.cn.dtlqc.cn http://www.morning.dqrpz.cn.gov.cn.dqrpz.cn http://www.morning.gklxm.cn.gov.cn.gklxm.cn http://www.morning.qkcyk.cn.gov.cn.qkcyk.cn http://www.morning.jpdbj.cn.gov.cn.jpdbj.cn http://www.morning.wfqcs.cn.gov.cn.wfqcs.cn http://www.morning.gbhsz.cn.gov.cn.gbhsz.cn http://www.morning.ftync.cn.gov.cn.ftync.cn http://www.morning.wfbs.cn.gov.cn.wfbs.cn