# Input to the model
x = torch.randn(1, 1, 28, 28)
torch_out = model(x)
# Export the model as onnx (lenet5.onnx)
torch.onnx.export(model, # model being run
x, # model input (or a tuple for multiple inputs)
"lenet5.onnx", # where to save the model (can be a file or file-like object)
export_params=True, # store the trained parameter weights inside the model file
opset_version=10, # the ONNX version to export the model to
do_constant_folding=True, # whether to execute constant folding for optimization
input_names = ['input'], # the model's input names
output_names = ['output'], # the model's output names
dynamic_axes={'input' : {0 : 'batch_size'}, # variable length axes
'output' : {0 : 'batch_size'}})
ご存知の通り、RealsenseやKinectなどの3Dセンサーだけでなく、スマートフォンなどにはInertial Measurement Unit (IMU)というものが入っています。これは、ジャイロスコープと加速度計からなる装置(GPSなどのセンサが付く場合もある)で、3軸の角速度および3方向の加速度を取得することができます。
Errors << ethz_apriltag2:cmake /home/takuya/kalibr_ws/logs/ethz_apriltag2/build.cmake.002.log
CMake Warning at /opt/ros/melodic/share/cmake_modules/cmake/Modules/FindEigen.cmake:62 (message):
The FindEigen.cmake Module in the cmake_modules package is deprecated.
Please use the FindEigen3.cmake Module provided with Eigen. Change
instances of find_package(Eigen) to find_package(Eigen3). Check the
FindEigen3.cmake Module for the resulting CMake variable names.
Call Stack (most recent call first):
CMakeLists.txt:8 (find_package)
CMake Warning at /opt/ros/melodic/share/catkin/cmake/catkin_package.cmake:166 (message):
catkin_package() DEPENDS on 'opencv' but neither 'opencv_INCLUDE_DIRS' nor
'opencv_LIBRARIES' is defined.
Call Stack (most recent call first):
/opt/ros/melodic/share/catkin/cmake/catkin_package.cmake:102 (_catkin_package)
CMakeLists.txt:10 (catkin_package)
target_type: 'aprilgrid' #gridtype
tagCols: 6 #number of apriltags
tagRows: 6 #number of apriltags
tagSize: 0.0271 #size of apriltag, edge to edge [m]
tagSpacing: 0.2214 #ratio of space between tags to tagSize
#Accelerometers
accelerometer_noise_density: 0.17503487119062797 #Noise density (continuous-time)
accelerometer_random_walk: 0.11540370899319194 #Bias random walk
#Gyroscopes
gyroscope_noise_density: 0.02955356570015007 #Noise density (continuous-time)
gyroscope_random_walk: 0.0038742360784085003 #Bias random walk
rostopic: /camera/imu #the IMU ROS topic
update_rate: 200.0 #Hz (for discretization of the values above)