ROS常用命令

# 用于rviz可视化urdf文件
roslaunch urdf_tutorial display.launch model:=/dir to urdf/robot.urdf
# 安装USB摄像头驱动
sudo apt install ros-kinetic-usb-cam
# 运行摄像头节点
rosrun usb_cam usb_cam_node
# 或者
rqt_image_view

# 摄像头标定
sudo apt install ros-kinetic-camera-calibration
# 运行标定程序
rosrun camera_calibration cameracalibrator.py --size 8x6 --square 0.024 image:=/usb_cam/image_raw camera:=/usb_cam
# 用于moveit命令行操控机器人
rosrun moveit_commander moveit_commander_cmdline.py
# 加载并启动控制器
rosrun controller_manager spawner controller1 controller2 ...

# 只加载不启动控制器
rosrun controller_manager spawner --stopped controller1 controller2 ...

# 停止控制器,但不卸载
rosrun controller_manager unspawner controller1 controller2 ...
# 用于终端显示话题消息
rostopic echo /arm_controller/follow_joint_trajectory/goal

# 将记录的包中的话题消息另存为一个新文件
rostopic echo -b y-m-d-h-m-s.bag -p /joint_states > joint_states.txt
# 修改权限
sudo chmod 666 /dev/ttyUSB0
# 查找dynamixel
roscore
rosrun dynamixel_workbench_controllers find_dynamixel /dev/ttyUSB0
# 启动dynamixel控制器
roslaunch dynamixel_tutorials controller_manager.launch
roslaunch dynamixel_workbench_controllers dynamixel_controllers.launch
# 命令行将xacro文件转为urdf文件
rosrun xacro xacro robot.xacro --inorder > robot.urdf

# launch文件中将xacro文件转为urdf文件
rosrun rosserial_python serial_node.py _port:=/dev/ttyUSB0 _baud:=1000000


  
    
    
  


################################################################################
roslaunch rosserial_server serial.launch port:=/dev/ttyUSB0
roslaunch rosserial_server socket.launch
rosrun rosserial_server serial_node _port:=/dev/ttyUSB0


  
    
      port: /dev/arduino
      require:
        publishers: [ status ]
        subscribers: [ cmd, lights ]
    
  
  

 

 

你可能感兴趣的:(ROS)