ND - 2. ROS essentials - run
Simple arm - Basic
init workspace
$ mkdir -p ~/catkin_ws/src
$ cd ~/catkin_ws/src
$ catkin_init_workspace
$ cd ~/catkin_ws
$ catkin_makeclone package
$ cd ~/catkin_ws/src
$ git clone https://github.com/udacity/simple_arm_01.git simple_arm
$ cd ~/catkin_ws
$ catkin_makefirst launch
$ apt-get install ros-kinetic-controller-manager
$ catkin_make$ source devel/setup.bash
$ roslaunch simple_arm robot_spawn.launchCheck dependence
Create Package
Simple arm - Architecture
node[simple_mover] -> publish -> simple_arm
node[arm_mover] -> service[move_arm] <- request[movement_commands] <- other node
node[arm_mover] -> service[safe_move] (minimum and maximum joint angles, by using parameters.)
node[arm_mover] -> service[safe_move] <- node[look_away] <- subscribe <- topic <- camera image
node[simple_mover] - Publisher
node內定義publisher, 送message到topic
Pattern
Service definition
GoToPosition.srv
CMakeLists.txt
In order for catkin to generate the python / C++ which allow you to utilize messages in your code
~/catkin_ws/src/simple_arm/CMakeLists.txt
package.xml
defining package’s properties
rosdepparsepackage.xml
package.xml
node[arm_mover] - Service
Launch File
~/catkin_ws/src/simple_arm/launch/robot_spawn.launch
RUN
service (/arm_mover/safe_move) and the node (/arm_mover) show up as expected.
Change Params
node[look_away] - Subscriber
RUN
Last updated
Was this helpful?