最近发现一个挺好用的注释工具,在vs code的扩展工具中找到
Doxygen Documentation Generator并安装。
默认的使用方法为:在代码文件头或者自定义函数上方的位置输入:/**,然后enter键。则会自动生成相应的注释。
/**
* @file IMUPreintergration.cpp
* @author xiaochen (youremail@xx.XX)
* @brief you file or function brief information
* @version 0.1
* @date 2022-06-26
*
* @copyright Copyright (c) 2022 Xiaochen Wang
*
*/
/**
* @brief use extrinsic parameters converter the IMU data
*
* @param imu_in
* @return sensor_msgs::Imu
*/
自定义代码格式可以通过:
File–>Preference–>Settings–>Extensions–>Doxygen Documentation Generator Settings设置相应的格式。