瞬驰(Dash)D1开发手册--Raspberry Pi之ROS空间的创建
来源:互联网 发布:linux 设置代理服务器 编辑:程序博客网 时间:2024/05/16 14:12
上一节,我们已经在Raspberry Pi上安装了ROS系统。这一节,我们来学习下如何构建ROS工作空间。
创建工作空间和ROS包
- 创建工作空间目录
mkdir ~/dashgo_ws/src
- 下载ros_arduino_bridge包,用于和下位机通讯,控制底盘的移动。
git clone https://github.com/hbrobotics/ros_arduino_bridge.gitcd ros_arduino_bridgegit checkout indigo-devel
- 创建dashgo_bringup包
cd ~/dashgo_ws/srccatkin_create_pkg dashgo_bringup std_msgs rospy roscppcd ~/dashgo_ws/src/dashgo_bringupmkdir launch script config
- 编译软件包
cd ~/catkin_wscatkin_make
修改配置
- 添加ros_arduino_python配置文件 ~/dashgo_ws/src/dashgo_bringup/config/my_arduino_params.yaml ,内容如下:
port: /dev/ttyACM0baud: 115200timeout: 0.1rate: 50sensorstate_rate: 10use_base_controller: Truebase_controller_rate: 10# For a robot that uses base_footprint, change base_frame to base_footprintbase_frame: base_link# === Robot drivetrain parameterswheel_diameter: 0.12wheel_track: 0.35encoder_resolution: 900 gear_reduction: 1.0motors_reversed: False# === PID parametersKp: 100Kd: 0Ki: 0Ko: 1000accel_limit: 0.3# === Sensor definitions. Examples only - edit for your robot.sensors: {}
创建dashgo的启动文件 ~/dashgo_ws/src/dashgo_bringup/launch/minimal.launch,内容如下:
<launch> <node name="arduino" pkg="ros_arduino_python" type="arduino_node.py" output="screen> <rosparam file="$(find dashgo_bringup)/config/my_arduino_params.yaml" command="load" /> </node> <arg name="node_name" value="velocity_smoother"/> <arg name="nodelet_manager_name" value="nodelet_manager"/> <arg name="config_file" value="$(find dashgo_bringup)/config/yocs_velocity_smoother.yaml"/> <arg name="raw_cmd_vel_topic" value="cmd_vel"/> <arg name="smooth_cmd_vel_topic" value="smooth_cmd_vel"/> <arg name="robot_cmd_vel_topic" value="robot_cmd_vel"/> <arg name="odom_topic" value="odom"/> <!-- nodelet manager --> <node pkg="nodelet" type="nodelet" name="$(arg nodelet_manager_name)" args="manager"/> <!-- velocity smoother --> <include file="$(find yocs_velocity_smoother)/launch/velocity_smoother.launch"> <arg name="node_name" value="$(arg node_name)"/> <arg name="nodelet_manager_name" value="$(arg nodelet_manager_name)"/> <arg name="config_file" value="$(arg config_file)"/> <arg name="raw_cmd_vel_topic" value="$(arg raw_cmd_vel_topic)"/> <arg name="smooth_cmd_vel_topic" value="$(arg smooth_cmd_vel_topic)"/> <arg name="robot_cmd_vel_topic" value="$(arg robot_cmd_vel_topic)"/> <arg name="odom_topic" value="$(arg odom_topic)"/> </include></launch>
- ros_arduino_python监听的速度由”cmd_vel”修改为“smooth_cmd_vel”
环境变量和权限
添加串口访问权限
sudo usermod -a -G dialout pi
时间同步
sudo ntpdate ntp.ubuntu.com
设置ROS环境变量,在~/.bashrc和 ~/.profile分别添加
alias vi='vim'alias ll='ls -lsource /opt/ros/indigo/setup.bashsource /home/pi/dashgo_ws/devel/setup.bash
另外需要安装下vim
sudo apt-get install vim
0 0
- 瞬驰(Dash)D1开发手册--Raspberry Pi之ROS空间的创建
- 瞬驰(Dash)D1开发手册--Raspberry Pi之速度控制
- 瞬驰(Dash)D1开发手册--Raspberry Pi之开机启动
- 瞬驰(Dash)D1开发手册--URDF
- 瞬驰(Dash)D1开发手册--超声波使用说明
- 瞬驰(Dash)D1开发手册--超声波传感器v1版
- 瞬驰(Dash)D1开发手册--超声波传感器v2版
- Ubuntu run in Raspberry pi 2 之SD 卡镜像篇(ROS开发准备)
- Ubuntu run in Raspberry pi 2 之SD 卡镜像篇(ROS开发准备)
- 树莓派(raspberry pi) Installing ROS Indigo on Raspberry Pi
- raspberry-pi之DSI
- ROS 学习一:ROS indigo 在 树莓派2(raspberry pi 2)上的安装
- 在Raspberry Pi上安装ROS
- 在Raspberry Pi上安装ROS Package
- Installing ROS Kinetic on the Raspberry Pi
- ROS工作空间的创建
- Raspberry Pi之旅【序】
- Raspberry Pi: 查看Raspberry Pi的ip地址
- Git提交代码常用命令
- 【meet in the middle深度优先搜索】 NOI2001方程的解数
- 比较两个浮点数的大小
- ssh 卡住...?
- 平行四边形数
- 瞬驰(Dash)D1开发手册--Raspberry Pi之ROS空间的创建
- 简单的单例模式
- makefile中参数定义
- 经典黑色--网站管理界面
- 1005. 继续(3n+1)猜想 (25)
- 高德地图开发获取SHA1码
- hihoCoder 1301筑地市场 数位dp加二分答案
- nyoj 239 月老的难题
- Ubuntu