解决办法:在使用 rosmsg show chapter2_tutorials/chapter2_msg1 之前,
需要在该工作空间的setup.bash文件,如下:
ly@ubuntu:~$ source /home/ly/dev/catkin_ws/devel/setup.bash
ly@ubuntu:~$ rosmsg show chapter2_tutorials/chapter2_msg1
int32 A
int32 B
int32 C
ly@ubuntu:~$ rossrv show chapter2_tutorials/chapter2_srv1
int32 A
int32 B
int32 C
---
int32 sum