2021-03-25Ubuntu常用命令记录:

Ubuntu常用命令记录:

1.调整系统字体大小:

gsettings set org.gnome.desktop.interface text-scaling-factor 1.2

 

2.使用rospy.wait_for_message(topic, topic_type, timeout)

不需要rospy.spin() ,可以直接获取话题的数据 , 注意要先定义节点

import rospy
from sensor_msgs.msg import LaserScan
def listener():
    rospy.init_node('get_laser')
    rospy.sleep(2)
    data = rospy.wait_for_message("/scan", LaserScan, timeout=None)
    print(data.ranges)
   
if __name__ == '__main__':
    listener()

3. Source,ROS工作空间:

gedit ~/.bashrc

source /opt/ros/melodic/setup.bash
source /home/jixianpc/catkin_study/devel/setup.bash
#export ROS_PACKAGE_PATH=/home/jixianpc/catkin_ws/src:$ROS_PACKAGE_PATH
export ROS_PACKAGE_PATH=home/jixianpc/wwws/src:$ROS_PACKAGE_PATH
source ~/catkin_ws/devel/setup.bash
source ~/catkin_ws/devel/setup.bash

最后一个支持 Python 2.7 的 opencv 版本是 4.2.0.32,因此执行如下命令安装 opencv:

 

1
pip install opencv-python==4.2.0.32

你可能感兴趣的:(系统命令,ubuntu)