在新的ROS工作空间进行代码编写

 

1. cd test_robotics_ws/

[email protected]:~/test_robotics_ws$ mkdir src

[email protected]:~/test_robotics_ws$ ls

src

[email protected]:~/test_robotics_ws$ cd src/

[email protected]:~/test_robotics_ws/src$ catkin_make

[email protected]:~/test_robotics_ws$ cd src/

[email protected]:~/test_robotics_ws/src$ ls

CMakeLists.txt

[email protected]:~/test_robotics_ws/src$ mv CMakeLists.txt CMakeLists.txt.old

[email protected]:~/test_robotics_ws/src$ cp /opt/ros/kinetic/share/catkin/cmake/toplevel.cmake CMakeLists.txt

[email protected]:~/test_robotics_ws/src$ catkin_create_pkg tf_learning roscpp rospy std_msgs tf

Created file tf_learning/package.xml

Created file tf_learning/CMakeLists.txt

Created folder tf_learning/include/tf_learning

Created folder tf_learning/src

Successfully created files in /home/ygx/test_robotics_ws/src/tf_learning. Please adjust the values in package.xml.

 

[email protected]:~/test_robotics_ws/src/tf_learning$ cd src/

[email protected]:~/test_robotics_ws/src/tf_learning/src$ ls

[email protected]:~/test_robotics_ws/src/tf_learning/src$ vim main.cpp

[email protected]:~/test_robotics_ws/src/tf_learning/src$ ls

在新的ROS工作空间进行代码编写

 

[email protected]:~/test_robotics_ws/src/tf_learning/src$ cd ..

[email protected]:~/test_robotics_ws/src/tf_learning$ ls

CMakeLists.txt include package.xml src

[email protected]:~/test_robotics_ws/src/tf_learning$ vim CMakeLists.txt

在新的ROS工作空间进行代码编写

[email protected]:~/test_robotics_ws$ rosed tf

tf tf2_eigen tf2_kdl tf2_py tf2_sensor_msgs

tf2 tf2_geometry_msgs tf2_msgs tf2_ros tf_conversions

[email protected]:~/test_robotics_ws$ rosed tf

tf tf2_eigen tf2_kdl tf2_py tf2_sensor_msgs

tf2 tf2_geometry_msgs tf2_msgs tf2_ros tf_conversions

[email protected]:~/test_robotics_ws$ source devel/setup.bash

[email protected]:~/test_robotics_ws$ rosed tf

tf tf2_eigen tf2_kdl tf2_py tf2_sensor_msgs tf_learning

tf2 tf2_geometry_msgs tf2_msgs tf2_ros tf_conversions

 

[email protected]:~/test_robotics_ws$ catkin_make -DCATKIN_WHITELIST_PACKAGES='tf_learning'

Base path: /home/ygx/test_robotics_ws

Source space: /home/ygx/test_robotics_ws/src

Build space: /home/ygx/test_robotics_ws/build

Devel space: /home/ygx/test_robotics_ws/devel

Install space: /home/ygx/test_robotics_ws/install

Scanning dependencies of target tf_learning_node

[ 50%] Building CXX object tf_learning/CMakeFiles/tf_learning_node.dir/src/main.cpp.o

[100%] Linking CXX executable /home/ygx/test_robotics_ws/devel/lib/tf_learning/tf_learning_node

[100%] Built target tf_learning_node

[email protected]:~/test_robotics_ws$ rosrun tf

tf tf2_eigen tf2_kdl tf2_py tf2_sensor_msgs tf_learning

tf2 tf2_geometry_msgs tf2_msgs tf2_ros tf_conversions

[email protected]:~/test_robotics_ws$ rosrun tf

tf tf2_eigen tf2_kdl tf2_py tf2_sensor_msgs tf_learning

tf2 tf2_geometry_msgs tf2_msgs tf2_ros tf_conversions

[email protected]:~/test_robotics_ws$ rosrun tf_learning tf_learning_node