ROS1入门经典课程,在其官网和B站等都有详细介绍和视频讲解。
古月居校园行
直接在蓝桥云课下载就可以学习和使用啦。
文档部分:
源码等:
将源码复制到demo_ws/src下,并编译后使用:
catkin build
代码语言:javascript复制ros1 kinetic(1) or ros2 ardent(2)?
1
shiyanlou:Code/ $ git clone https://gitcode.net/ZhangRelay/ros_book.git
u6b63u514bu9686u5230 'ros_book'...
remote: Enumerating objects: 15, done.
remote: Counting objects: 100% (15/15), done.
remote: Compressing objects: 100% (15/15), done.
remote: Total 15 (delta 3), reused 0 (delta 0), pack-reused 0
u5c55u5f00u5bf9u8c61u4e2d: 100% (15/15), u5b8cu6210.
u68c0u67e5u8fdeu63a5... u5b8cu6210u3002
shiyanlou:Code/ $ unzip ros_book/ros_21_tutorials-master.zip [13:45:05]
Archive: ros_book/ros_21_tutorials-master.zip
a5296958c8b73476ebffe12d2aa4c8049e6c177f
creating: ros_21_tutorials-master/
inflating: ros_21_tutorials-master/README.md
creating: ros_21_tutorials-master/docs/
extracting: ros_21_tutorials-master/docs/poster.png
inflating: ros_21_tutorials-master/docs/poster2.png
inflating: ros_21_tutorials-master/docs/schedule.png
creating: ros_21_tutorials-master/docs/slides/
inflating: ros_21_tutorials-master/docs/slides/u53e4u6708 · ROSu5165u95e821u8bb2_1.u8bfeu7a0bu4ecbu7ecd.pdf
inflating: ros_21_tutorials-master/docs/slides/u53e4u6708 · ROSu5165u95e821u8bb2_10.u53d1u5e03u8005Publisheru7684u7f16u7a0bu5b9eu73b0.pdf
inflating: ros_21_tutorials-master/docs/slides/u53e4u6708 · ROSu5165u95e821u8bb2_11.u8ba2u9605u8005Subscriberu7684u7f16u7a0bu5b9eu73b0.pdf
inflating: ros_21_tutorials-master/docs/slides/u53e4u6708 · ROSu5165u95e821u8bb2_12.u8bddu9898u6d88u606fu7684u5b9au4e49u4e0eu4f7fu7528.pdf
inflating: ros_21_tutorials-master/docs/slides/u53e4u6708 · ROSu5165u95e821u8bb2_13.u5ba2u6237u7aefClientu7684u7f16u7a0bu5b9eu73b0.pdf
inflating: ros_21_tutorials-master/docs/slides/u53e4u6708 · ROSu5165u95e821u8bb2_14.u670du52a1u7aefServeru7684u7f16u7a0bu5b9eu73b0.pdf
inflating: ros_21_tutorials-master/docs/slides/u53e4u6708 · ROSu5165u95e821u8bb2_15.u670du52a1u6570u636eu7684u5b9au4e49u4e0eu4f7fu7528.pdf
inflating: ros_21_tutorials-master/docs/slides/u53e4u6708 · ROSu5165u95e821u8bb2_16.u53c2u6570u7684u4f7fu7528u4e0eu7f16u7a0bu65b9u6cd5.pdf
inflating: ros_21_tutorials-master/docs/slides/u53e4u6708 · ROSu5165u95e821u8bb2_17.ROSu4e2du7684u5750u6807u7cfbu7ba1u7406u7cfbu7edf.pdf
inflating: ros_21_tutorials-master/docs/slides/u53e4u6708 · ROSu5165u95e821u8bb2_18.tfu5750u6807u7cfbu5e7fu64adu4e0eu76d1u542cu7684u7f16u7a0bu5b9eu73b0.pdf
inflating: ros_21_tutorials-master/docs/slides/u53e4u6708 · ROSu5165u95e821u8bb2_19.launchu542fu52a8u6587u4ef6u7684u4f7fu7528u65b9u6cd5.pdf
inflating: ros_21_tutorials-master/docs/slides/u53e4u6708 · ROSu5165u95e821u8bb2_2.Linuxu7cfbu7edfu4ecbu7ecdu53cau5b89u88c5.pdf
inflating: ros_21_tutorials-master/docs/slides/u53e4u6708 · ROSu5165u95e821u8bb2_20.u5e38u7528u53efu89c6u5316u5de5u5177u7684u4f7fu7528.pdf
inflating: ros_21_tutorials-master/docs/slides/u53e4u6708 · ROSu5165u95e821u8bb2_21.u8bfeu7a0bu603bu7ed3u4e0eu8fdbu9636u653bu7565.pdf
inflating: ros_21_tutorials-master/docs/slides/u53e4u6708 · ROSu5165u95e821u8bb2_3.Linuxu7cfbu7edfu57fau7840u64cdu4f5c.pdf
inflating: ros_21_tutorials-master/docs/slides/u53e4u6708 · ROSu5165u95e821u8bb2_4.u7f16u7a0bu6781u7b80u57fau7840.pdf
inflating: ros_21_tutorials-master/docs/slides/u53e4u6708 · ROSu5165u95e821u8bb2_5.u5b89u88c5ROSu7cfbu7edf.pdf
inflating: ros_21_tutorials-master/docs/slides/u53e4u6708 · ROSu5165u95e821u8bb2_6.ROSu662fu4ec0u4e48.pdf
inflating: ros_21_tutorials-master/docs/slides/u53e4u6708 · ROSu5165u95e821u8bb2_7.ROSu7684u6838u5fc3u6982u5ff5.pdf
inflating: ros_21_tutorials-master/docs/slides/u53e4u6708 · ROSu5165u95e821u8bb2_8.ROSu547du4ee4u884cu5de5u5177u7684u4f7fu7528.pdf
inflating: ros_21_tutorials-master/docs/slides/u53e4u6708 · ROSu5165u95e821u8bb2_9.u521bu5efau5de5u4f5cu7a7au95f4u4e0eu529fu80fdu5305.pdf
inflating: ros_21_tutorials-master/docs/slides/u53e4u6708 · ROSu5165u95e821u8bb2_u52a01.u5b66u5b8c21u8bb2uff0cu8be5u5b66u4ec0u4e48.pdf
inflating: ros_21_tutorials-master/docs/slides/u53e4u6708 · ROSu5165u95e821u8bb2_u52a02.ROSu5728u673au5668u4ebau4e2du662fu5982u4f55u8fd0u884cu7684.pdf
creating: ros_21_tutorials-master/learning_launch/
inflating: ros_21_tutorials-master/learning_launch/CMakeLists.txt
creating: ros_21_tutorials-master/learning_launch/config/
inflating: ros_21_tutorials-master/learning_launch/config/param.yaml
creating: ros_21_tutorials-master/learning_launch/launch/
inflating: ros_21_tutorials-master/learning_launch/launch/simple.launch
inflating: ros_21_tutorials-master/learning_launch/launch/start_tf_demo_c .launch
inflating: ros_21_tutorials-master/learning_launch/launch/start_tf_demo_py.launch
inflating: ros_21_tutorials-master/learning_launch/launch/turtlesim_parameter_config.launch
inflating: ros_21_tutorials-master/learning_launch/launch/turtlesim_remap.launch
inflating: ros_21_tutorials-master/learning_launch/package.xml
creating: ros_21_tutorials-master/learning_parameter/
inflating: ros_21_tutorials-master/learning_parameter/CMakeLists.txt
creating: ros_21_tutorials-master/learning_parameter/config/
inflating: ros_21_tutorials-master/learning_parameter/config/turtle_param.yaml
inflating: ros_21_tutorials-master/learning_parameter/package.xml
creating: ros_21_tutorials-master/learning_parameter/scripts/
inflating: ros_21_tutorials-master/learning_parameter/scripts/parameter_config.py
creating: ros_21_tutorials-master/learning_parameter/src/
inflating: ros_21_tutorials-master/learning_parameter/src/parameter_config.cpp
creating: ros_21_tutorials-master/learning_service/
inflating: ros_21_tutorials-master/learning_service/CMakeLists.txt
inflating: ros_21_tutorials-master/learning_service/package.xml
creating: ros_21_tutorials-master/learning_service/scripts/
inflating: ros_21_tutorials-master/learning_service/scripts/person_client.py
inflating: ros_21_tutorials-master/learning_service/scripts/person_server.py
inflating: ros_21_tutorials-master/learning_service/scripts/turtle_command_server.py
inflating: ros_21_tutorials-master/learning_service/scripts/turtle_spawn.py
creating: ros_21_tutorials-master/learning_service/src/
inflating: ros_21_tutorials-master/learning_service/src/person_client.cpp
inflating: ros_21_tutorials-master/learning_service/src/person_server.cpp
inflating: ros_21_tutorials-master/learning_service/src/turtle_command_server.cpp
inflating: ros_21_tutorials-master/learning_service/src/turtle_spawn.cpp
creating: ros_21_tutorials-master/learning_service/srv/
inflating: ros_21_tutorials-master/learning_service/srv/Person.srv
creating: ros_21_tutorials-master/learning_tf/
inflating: ros_21_tutorials-master/learning_tf/CMakeLists.txt
creating: ros_21_tutorials-master/learning_tf/launch/
inflating: ros_21_tutorials-master/learning_tf/launch/start_tf_demo_c .launch
inflating: ros_21_tutorials-master/learning_tf/launch/start_tf_demo_py.launch
inflating: ros_21_tutorials-master/learning_tf/package.xml
creating: ros_21_tutorials-master/learning_tf/scripts/
inflating: ros_21_tutorials-master/learning_tf/scripts/turtle_tf_broadcaster.py
inflating: ros_21_tutorials-master/learning_tf/scripts/turtle_tf_listener.py
creating: ros_21_tutorials-master/learning_tf/src/
inflating: ros_21_tutorials-master/learning_tf/src/turtle_tf_broadcaster.cpp
inflating: ros_21_tutorials-master/learning_tf/src/turtle_tf_listener.cpp
creating: ros_21_tutorials-master/learning_topic/
inflating: ros_21_tutorials-master/learning_topic/CMakeLists.txt
creating: ros_21_tutorials-master/learning_topic/msg/
inflating: ros_21_tutorials-master/learning_topic/msg/Person.msg
inflating: ros_21_tutorials-master/learning_topic/package.xml
creating: ros_21_tutorials-master/learning_topic/scripts/
inflating: ros_21_tutorials-master/learning_topic/scripts/person_publisher.py
inflating: ros_21_tutorials-master/learning_topic/scripts/person_subscriber.py
inflating: ros_21_tutorials-master/learning_topic/scripts/pose_subscriber.py
inflating: ros_21_tutorials-master/learning_topic/scripts/velocity_publisher.py
creating: ros_21_tutorials-master/learning_topic/src/
inflating: ros_21_tutorials-master/learning_topic/src/person_publisher.cpp
inflating: ros_21_tutorials-master/learning_topic/src/person_subscriber.cpp
inflating: ros_21_tutorials-master/learning_topic/src/pose_subscriber.cpp
inflating: ros_21_tutorials-master/learning_topic/src/velocity_publisher.cpp
creating: ros_21_tutorials-master/linux/
inflating: ros_21_tutorials-master/linux/c _class.cpp
inflating: ros_21_tutorials-master/linux/c _for.cpp
inflating: ros_21_tutorials-master/linux/c _while.cpp
inflating: ros_21_tutorials-master/linux/python_class.py
inflating: ros_21_tutorials-master/linux/python_for.py
inflating: ros_21_tutorials-master/linux/python_while.py
inflating: ros_21_tutorials-master/u300aROSu5165u95e821u8bb2u300bu6559u7a0bu8865u5145u8d44u6599.pdf
shiyanlou:Code/ $ cd demo_ws [13:45:43]
shiyanlou:demo_ws/ $ catkin build [13:46:49]
-----------------------------------------------------------------
Profile: default
Extending: [env] /opt/ros/kinetic
Workspace: /home/shiyanlou/Code/demo_ws
-----------------------------------------------------------------
Build Space: [exists] /home/shiyanlou/Code/demo_ws/build
Devel Space: [exists] /home/shiyanlou/Code/demo_ws/devel
Install Space: [unused] /home/shiyanlou/Code/demo_ws/install
Log Space: [missing] /home/shiyanlou/Code/demo_ws/logs
Source Space: [exists] /home/shiyanlou/Code/demo_ws/src
DESTDIR: [unused] None
-----------------------------------------------------------------
Devel Space Layout: linked
Install Space Layout: None
-----------------------------------------------------------------
Additional CMake Args: None
Additional Make Args: None
Additional catkin Make Args: None
Internal Make Job Server: True
Cache Job Environments: False
-----------------------------------------------------------------
Buildlisted Packages: None
Skiplisted Packages: None
-----------------------------------------------------------------
Workspace configuration appears valid.
NOTE: Forcing CMake to run for each package.
-----------------------------------------------------------------
[build] Found '5' packages in 0.0 seconds.
[build] Updating package table.
Starting >>> catkin_tools_prebuild
Finished <<< catkin_tools_prebuild [ 2.3 seconds ]
Starting >>> learning_launch
Starting >>> learning_parameter
Starting >>> learning_service
Starting >>> learning_tf
Finished <<< learning_launch [ 10.8 seconds ]
Starting >>> learning_topic
Finished <<< learning_parameter [ 24.6 seconds ]
Finished <<< learning_tf [ 47.4 seconds ]
Finished <<< learning_service [ 56.3 seconds ]
Finished <<< learning_topic [ 46.4 seconds ]
[build] Summary: All 6 packages succeeded!
[build] Ignored: None.
[build] Warnings: None.
[build] Abandoned: None.
[build] Failed: None.
[build] Runtime: 59.6 seconds total.
[build] Note: Workspace packages have changed, please re-source setup files to use them.
Exception ignored in: <bound method BaseEventLoop.__del__ of <_UnixSelectorEventLoop running=False closed=True debug=False>>
Traceback (most recent call last):
File "/usr/lib/python3.5/asyncio/base_events.py", line 431, in __del__
File "/usr/lib/python3.5/asyncio/unix_events.py", line 58, in close
File "/usr/lib/python3.5/asyncio/unix_events.py", line 139, in remove_signal_handler
File "/usr/lib/python3.5/signal.py", line 47, in signal
TypeError: signal handler must be signal.SIG_IGN, signal.SIG_DFL, or a callable object
shiyanlou:demo_ws/ $ source devel/setup.bash [13:47:55]
devel/setup.bash:.:8: u6ca1u6709u90a3u4e2au6587u4ef6u6216u76eeu5f55: /home/shiyanlou/Code/demo_ws/setup.sh
shiyanlou:demo_ws/ $ source devel/setup.zsh [13:48:31]
shiyanlou:demo_ws/ $ roslaunch learning_launch start_tf_demo_c .launch
... logging to /home/shiyanlou/.ros/log/8ba90254-ad0b-11ec-bf40-0242c0a82a04/roslaunch-5a0e7854a36d-30370.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://5a0e7854a36d:36559/
SUMMARY
========
PARAMETERS
* /rosdistro: kinetic
* /rosversion: 1.12.17
NODES
/
listener (learning_tf/turtle_tf_listener)
sim (turtlesim/turtlesim_node)
teleop (turtlesim/turtle_teleop_key)
turtle1_tf_broadcaster (learning_tf/turtle_tf_broadcaster)
turtle2_tf_broadcaster (learning_tf/turtle_tf_broadcaster)
auto-starting new master
process[master]: started with pid [30380]
ROS_MASTER_URI=http://localhost:11311
setting /run_id to 8ba90254-ad0b-11ec-bf40-0242c0a82a04
process[rosout-1]: started with pid [30393]
started core service [/rosout]
process[sim-2]: started with pid [30396]
process[teleop-3]: started with pid [30407]
process[turtle1_tf_broadcaster-4]: started with pid [30409]
process[turtle2_tf_broadcaster-5]: started with pid [30418]
process[listener-6]: started with pid [30422]
Reading from keyboard
---------------------------
Use arrow keys to move the turtle.