Learning ROS for Robotics Programming Second Edition学习笔记(一) indigo v-rep
安装系统ubuntu14.04和ros indigo。
注意:环境配置。
ROS体系结构与概念
注意理解:
启动核,roscore.
文件系统层,包,包清单,消息,服务,工作空间等。
运算图层,节点,主,消息,主题,服务,包等。
Nodes: rosun, rosnode, Topics: rostopic, Services: rosservice, Messages: rosmsg, Bags: rosbag.
快速查找:rospack find, rosstack find, rosls, roscd.
建立自己工作空间(workspace), 非常重要,mkdir /catkin_ws/src, catkin_init_workspace, catkin_make.
新建包和元包,catkin_create_pkg.
编译,catkin_make.
小乌龟例子回顾
常用:roscore, rosnode, rosrun, rostopic, rosmsg, rosservice, rosparam, roscd, roslaunch.
--roscore
--rosrun turtlesim turtlesim_node
--rosrun turtlesim turtle_teleop_key
--rosnode list
/rosout
/teleop_turtle
/turtlesim
--rostopic list
/rosout
/rosout_agg
/turtle1/cmd_vel
/turtle1/color_sensor
/turtle1/pose
--rostopic type /turtle1/cmd_vel
geometry_msgs/Twist
--rosmsg show geometry_msgs/Twist
geometry_msgs/Vector3 linear
float64 x
float64 y
float64 z
geometry_msgs/Vector3 angular
float64 x
float64 y
float64 z
--rostopic pub -1 /turtle1/cmd_vel geometry_msgs/Twist -- '[2.0, 0.0, 0.0]' '[0.0, 0.0, 1.8]'
--rostopic pub /turtle1/cmd_vel geometry_msgs/Twist -r 1 -- '[2.0, 0.0, 0.0]' '[0.0, 0.0, 1.8]'
--rosservice list
/clear
/kill
/reset
/rosout/get_loggers
/rosout/set_logger_level
/spawn
/teleop_turtle/get_loggers
/teleop_turtle/set_logger_level
/turtle1/set_pen
/turtle1/teleport_absolute
/turtle1/teleport_relative
/turtlesim/get_loggers
/turtlesim/set_logger_level
--rosservice call /spawn 3 3 0.2 "new_turtle"
--rosparam list
/background_b
/background_g
/background_r
/rosdistro
/rosversion
/run_id
--rosparam set /background_b 100
------------------------------------------------------------------------------------------------------------------------------------------------
V-Rep例子
--roscore
--./vrep.sh
--rosnode list
/rosout
/vrep
--rosservice list
/rosout/get_loggers
/rosout/set_logger_level
/vrep/get_loggers
/vrep/set_logger_level
/vrep/simRosAddStatusbarMessage
/vrep/simRosAuxiliaryConsoleClose
/vrep/simRosAuxiliaryConsoleOpen
/vrep/simRosAuxiliaryConsolePrint
/vrep/simRosAuxiliaryConsoleShow
/vrep/simRosBreakForceSensor
/vrep/simRosClearFloatSignal
/vrep/simRosClearIntegerSignal
/vrep/simRosClearStringSignal
/vrep/simRosCloseScene
/vrep/simRosCopyPasteObjects
/vrep/simRosCreateDummy
/vrep/simRosDisablePublisher
/vrep/simRosDisableSubscriber
/vrep/simRosDisplayDialog
/vrep/simRosEnablePublisher
/vrep/simRosEnableSubscriber
/vrep/simRosEndDialog
/vrep/simRosEraseFile
/vrep/simRosGetAndClearStringSignal
/vrep/simRosGetArrayParameter
/vrep/simRosGetBooleanParameter
/vrep/simRosGetCollisionHandle
/vrep/simRosGetDialogInput
/vrep/simRosGetDialogResult
/vrep/simRosGetDistanceHandle
/vrep/simRosGetFloatSignal
/vrep/simRosGetFloatingParameter
/vrep/simRosGetInfo
/vrep/simRosGetIntegerParameter
/vrep/simRosGetIntegerSignal
/vrep/simRosGetJointMatrix
/vrep/simRosGetJointState
/vrep/simRosGetLastErrors
/vrep/simRosGetModelProperty
/vrep/simRosGetObjectChild
/vrep/simRosGetObjectFloatParameter
/vrep/simRosGetObjectGroupData
/vrep/simRosGetObjectHandle
/vrep/simRosGetObjectIntParameter
/vrep/simRosGetObjectParent
/vrep/simRosGetObjectPose
/vrep/simRosGetObjectSelection
/vrep/simRosGetObjects
/vrep/simRosGetStringParameter
/vrep/simRosGetStringSignal
/vrep/simRosGetUIButtonProperty
/vrep/simRosGetUIEventButton
/vrep/simRosGetUIHandle
/vrep/simRosGetUISlider
/vrep/simRosGetVisionSensorDepthBuffer
/vrep/simRosGetVisionSensorImage
/vrep/simRosLoadModel
/vrep/simRosLoadScene
/vrep/simRosLoadUI
/vrep/simRosPauseSimulation
/vrep/simRosReadCollision
/vrep/simRosReadDistance
/vrep/simRosReadForceSensor
/vrep/simRosReadProximitySensor
/vrep/simRosReadVisionSensor
/vrep/simRosRemoveModel
/vrep/simRosRemoveObject
/vrep/simRosRemoveUI
/vrep/simRosSetArrayParameter
/vrep/simRosSetBooleanParameter
/vrep/simRosSetFloatSignal
/vrep/simRosSetFloatingParameter
/vrep/simRosSetIntegerParameter
/vrep/simRosSetIntegerSignal
/vrep/simRosSetJointForce
/vrep/simRosSetJointPosition
/vrep/simRosSetJointState
/vrep/simRosSetJointTargetPosition
/vrep/simRosSetJointTargetVelocity
/vrep/simRosSetModelProperty
/vrep/simRosSetObjectFloatParameter
/vrep/simRosSetObjectIntParameter
/vrep/simRosSetObjectParent
/vrep/simRosSetObjectPose
/vrep/simRosSetObjectPosition
/vrep/simRosSetObjectQuaternion
/vrep/simRosSetObjectSelection
/vrep/simRosSetSphericalJointMatrix
/vrep/simRosSetStringSignal
/vrep/simRosSetUIButtonLabel
/vrep/simRosSetUIButtonProperty
/vrep/simRosSetUISlider
/vrep/simRosSetVisionSensorImage
/vrep/simRosStartSimulation
/vrep/simRosStopSimulation
/vrep/simRosSynchronous
/vrep/simRosSynchronousTrigger
/vrep/simRosTransferFile
--rostopic list
/rosout
/rosout_agg
/tf
/vrep/info
启动仿真
--rosservice call /vrep/simRosStartSimulation
result: 1
停止仿真
--rosservice call /vrep/simRosStopSimulation
启动场景
Test.ttt
--rostopic list
/rosout
/rosout_agg
/tf
/vrep/Vision_sensor_0
/vrep/Vision_sensor_0/compressed
/vrep/Vision_sensor_0/compressed/parameter_descriptions
/vrep/Vision_sensor_0/compressed/parameter_updates
/vrep/Vision_sensor_0/compressedDepth
/vrep/Vision_sensor_0/compressedDepth/parameter_descriptions
/vrep/Vision_sensor_0/compressedDepth/parameter_updates
/vrep/Vision_sensor_0/theora
/vrep/Vision_sensor_0/theora/parameter_descriptions
/vrep/Vision_sensor_0/theora/parameter_updates
/vrep/base/pose
/vrep/camera_info
/vrep/end_eff/pose
/vrep/imu
/vrep/info
/vrep/quadrotor_0/pose
/vrep/quadrotor_0/twist
/vrep/viper_0/jointStatus
ROS查看四旋翼虚拟摄像头
--rosrun image_view image_view image:=/vrep/Vision_sensor_0
--rosservice call /vrep/simRosStartSimulation
i.youku.com/zhangrelay