Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问最后重投影的结果是发布在/debug_reprojection话题下吗?我的这个话题显示NO image #1

Open
Kris-Zh opened this issue Apr 29, 2019 · 16 comments

Comments

@Kris-Zh
Copy link

Kris-Zh commented Apr 29, 2019

 学长您好,我在测试您的标定方法;我选择了35个点记录到了data里面。R和T也分别计算出来了,但是最后运行那个roslaunch camera_laser_calibration reprojection_test后并没有出现重投影的结果。
这是输出:

$ roslaunch camera_laser_calibration reprojection_test.launch
... logging to /home/tent/.ros/log/d2fa9d90-6a86-11e9-b397-fcaa1443ac50/roslaunch-zgq-8859.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://localhost:33439/

SUMMARY

PARAMETERS

  • /calib_result_path: /home/tent/Camera...
  • /image_topic: /camera/image_raw
  • /rosdistro: kinetic
  • /rosversion: 1.12.13
  • /scan_topic: /scan

NODES
/
reprojection_test (camera_laser_calibration/reprojection_test)
rviz (rviz/rviz)

ROS_MASTER_URI=http://localhost:11311

process[reprojection_test-1]: started with pid [8876]
process[rviz-2]: started with pid [8877]
Config.path = /home/tent/Camera_ws/src/camera_lidar_calibration/config/config.yaml
[ INFO] [1556547076.207772850]:
[-0.2961342944500001, 0.4714774343942, -0.8306709013144;
-0.6231966485498001, 0.5636865030646199, 0.5421103929956;
0.7238308190936, 0.6782085002524, 0.12689604067862]
[ INFO] [1556547076.207827004]:
[-446309;
-311055;
1076620]
K:
[1870.089100832898, 0, 775.9379595721259;
0, 1868.052541494669, 539.6847247483735;
0, 0, 1]
D:
[-0.1176336838255311;
0.1704938674443067;
0.001421206207294814;
0.001356481077448661;
0]
[ INFO] [1556547076.207895021]: Rcl =
[-0.2961342944500001, 0.4714774343942, -0.8306709013144;
-0.6231966485498001, 0.5636865030646199, 0.5421103929956;
0.7238308190936, 0.6782085002524, 0.12689604067862]
[ INFO] [1556547076.207913609]: tcl =
[-446309;
-311055;
1076620]
[ INFO] [1556547076.207926375]: image_topic: /camera/image_raw
[ INFO] [1556547076.207937221]: scan_topic: /scan
image

@TurtleZhong
Copy link
Owner

TurtleZhong commented Apr 29, 2019 via email

@TurtleZhong
Copy link
Owner

我刚刚去看了一下源码 应该是发布的时候有问题 我可能没写topic 然后你要不直接在重投影的cpp里边 把图imshow出来 或者你自己写个发布

@TurtleZhong
Copy link
Owner

 学长您好,我在测试您的标定方法;我选择了35个点记录到了data里面。R和T也分别计算出来了,但是最后运行那个roslaunch camera_laser_calibration reprojection_test后并没有出现重投影的结果。
这是输出:

$ roslaunch camera_laser_calibration reprojection_test.launch
... logging to /home/tent/.ros/log/d2fa9d90-6a86-11e9-b397-fcaa1443ac50/roslaunch-zgq-8859.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://localhost:33439/

SUMMARY

PARAMETERS

  • /calib_result_path: /home/tent/Camera...
  • /image_topic: /camera/image_raw
  • /rosdistro: kinetic
  • /rosversion: 1.12.13
  • /scan_topic: /scan

NODES
/
reprojection_test (camera_laser_calibration/reprojection_test)
rviz (rviz/rviz)

ROS_MASTER_URI=http://localhost:11311

process[reprojection_test-1]: started with pid [8876]
process[rviz-2]: started with pid [8877]
Config.path = /home/tent/Camera_ws/src/camera_lidar_calibration/config/config.yaml
[ INFO] [1556547076.207772850]:
[-0.2961342944500001, 0.4714774343942, -0.8306709013144;
-0.6231966485498001, 0.5636865030646199, 0.5421103929956;
0.7238308190936, 0.6782085002524, 0.12689604067862]
[ INFO] [1556547076.207827004]:
[-446309;
-311055;
1076620]
K:
[1870.089100832898, 0, 775.9379595721259;
0, 1868.052541494669, 539.6847247483735;
0, 0, 1]
D:
[-0.1176336838255311;
0.1704938674443067;
0.001421206207294814;
0.001356481077448661;
0]
[ INFO] [1556547076.207895021]: Rcl =
[-0.2961342944500001, 0.4714774343942, -0.8306709013144;
-0.6231966485498001, 0.5636865030646199, 0.5421103929956;
0.7238308190936, 0.6782085002524, 0.12689604067862]
[ INFO] [1556547076.207913609]: tcl =
[-446309;
-311055;
1076620]
[ INFO] [1556547076.207926375]: image_topic: /camera/image_raw
[ INFO] [1556547076.207937221]: scan_topic: /scan
image

你这个标定似乎有问题啊 你仔细看你的

 学长您好,我在测试您的标定方法;我选择了35个点记录到了data里面。R和T也分别计算出来了,但是最后运行那个roslaunch camera_laser_calibration reprojection_test后并没有出现重投影的结果。
这是输出:

$ roslaunch camera_laser_calibration reprojection_test.launch
... logging to /home/tent/.ros/log/d2fa9d90-6a86-11e9-b397-fcaa1443ac50/roslaunch-zgq-8859.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://localhost:33439/

SUMMARY

PARAMETERS

  • /calib_result_path: /home/tent/Camera...
  • /image_topic: /camera/image_raw
  • /rosdistro: kinetic
  • /rosversion: 1.12.13
  • /scan_topic: /scan

NODES
/
reprojection_test (camera_laser_calibration/reprojection_test)
rviz (rviz/rviz)

ROS_MASTER_URI=http://localhost:11311

process[reprojection_test-1]: started with pid [8876]
process[rviz-2]: started with pid [8877]
Config.path = /home/tent/Camera_ws/src/camera_lidar_calibration/config/config.yaml
[ INFO] [1556547076.207772850]:
[-0.2961342944500001, 0.4714774343942, -0.8306709013144;
-0.6231966485498001, 0.5636865030646199, 0.5421103929956;
0.7238308190936, 0.6782085002524, 0.12689604067862]
[ INFO] [1556547076.207827004]:
[-446309;
-311055;
1076620]
K:
[1870.089100832898, 0, 775.9379595721259;
0, 1868.052541494669, 539.6847247483735;
0, 0, 1]
D:
[-0.1176336838255311;
0.1704938674443067;
0.001421206207294814;
0.001356481077448661;
0]
[ INFO] [1556547076.207895021]: Rcl =
[-0.2961342944500001, 0.4714774343942, -0.8306709013144;
-0.6231966485498001, 0.5636865030646199, 0.5421103929956;
0.7238308190936, 0.6782085002524, 0.12689604067862]
[ INFO] [1556547076.207913609]: tcl =
[-446309;
-311055;
1076620]
[ INFO] [1556547076.207926375]: image_topic: /camera/image_raw
[ INFO] [1556547076.207937221]: scan_topic: /scan
image

你这个标定有问题啊 你仔细看你标定出来的t 数值太大了,我之前做这个方法的时候需要一个比较好的初值,所有你尽量提供一个比较好的初值,用手量就行

@Kris-Zh
Copy link
Author

Kris-Zh commented Apr 30, 2019

感谢您的即使回复
我是把相机和雷达并排放置的,t的初值我设置的是(0.7,0,0)。看到有一个话题发布是/debug_reprojection但是没有图像,ROS编程这方面我是刚接触,您说的在cpp里inshow图像我不太清楚。

@Kris-Zh
Copy link
Author

Kris-Zh commented Apr 30, 2019

我没有跑bag,直接用的两个传感器的实时数据

@TurtleZhong
Copy link
Owner

TurtleZhong commented Apr 30, 2019 via email

@Kris-Zh
Copy link
Author

Kris-Zh commented Apr 30, 2019

好的 那我重新标定一下 感谢!

@TurtleZhong
Copy link
Owner

TurtleZhong commented Apr 30, 2019 via email

@Kris-Zh
Copy link
Author

Kris-Zh commented Apr 30, 2019

哦,对了;还有一个问题,运行您的给的bag,您默认的图像话题是/xp2s/left/image_raw,我这边是/camera/image_raw;我即使修改了collect_laser_image_data.launch中的改为/camera/image_raw,在rviz里面仍然没有图像,我不知道怎么修改能够显示。

@TurtleZhong
Copy link
Owner

TurtleZhong commented Apr 30, 2019 via email

@Kris-Zh
Copy link
Author

Kris-Zh commented Apr 30, 2019

好像不行,我把launch里面改了,rviz里面只有/camera/image_raw话题,还是没有,是不是这个bag图像没有成功发布,激光/scan有显示。
image

@TurtleZhong
Copy link
Owner

TurtleZhong commented Apr 30, 2019 via email

@TurtleZhong
Copy link
Owner

好像不行,我把launch里面改了,rviz里面只有/camera/image_raw话题,还是没有,是不是这个bag图像没有成功发布,激光/scan有显示。
image

我check了代码 这个是因为reprojection代码用的是messagefilter方法,这个需要两个topic是同一个时钟源的 而且我的这个工程有一个bag样例 在这里https://github.com/TurtleZhong/camera_lidar_calibration_v2/tree/master/example_rosbag
所以如果你的传感器不做一些处理的话是没法进callback的,你直接照着代码改改就好了

@Kris-Zh
Copy link
Author

Kris-Zh commented Apr 30, 2019

好吧 您说的我其实不太明白,我探索一下。另外问您一下关于V2版本的一些其他遇到的问题:
1.这个选取特征点有没有什么要求?对数量和位置上的要求?我是直接在雷达前面放了一个箱子,显示一条直线,就在这条直线上选点,不知道这样行不行。
2.我重新标定了26个点,这次标定失败了(失败了两次了),我把输出放下面了。(是因为点太少还是我选的点不好吗?)
3.标定的src里面是只初始化 t 吗?
`$ roslaunch camera_laser_calibration calibration.launch
... logging to /home/tent/.ros/log/836ba458-6b54-11e9-8d5c-fcaa1443ac50/roslaunch-zgq-8507.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://localhost:42275/

SUMMARY

PARAMETERS

  • /rosdistro: kinetic
  • /rosversion: 1.12.13

NODES
/
calibration (camera_laser_calibration/calibration)

ROS_MASTER_URI=http://localhost:11311

process[calibration-1]: started with pid [8524]
Config.path = /home/tent/Camera_ws/src/camera_lidar_calibration/config/config.yaml
data.path = /home/tent/Camera_ws/src/camera_lidar_calibration/data/data.txt
Before Optimization
R =
1 0 0
0 1 0
0 0 1
t =
0 0.1 0
Load data suscessfully!
WARNING: Logging before InitGoogleLogging() is written to STDERR
W0430 23:15:54.525885 8524 residual_block.cc:131]

Error in evaluating the ResidualBlock.

There are two possible reasons. Either the CostFunction did not evaluate and fill all
residual and jacobians that were requested or there was a non-finite value (nan/infinite)
generated during the or jacobian computation.

Residual Block size: 3 parameter blocks x 2 residuals

For each parameter block, the value of the parameters are printed in the first column
and the value of the jacobian under the corresponding residual. If a ParameterBlock was
held constant then the corresponding jacobian is printed as 'Not Computed'. If an entry
of the Jacobian/residual array was requested but was not written to by user code, it is
indicated by 'Uninitialized'. This is an error. Residuals or Jacobian values evaluating
to Inf or NaN is also an error.

Residuals: inf inf

Parameter Block 0, size: 4

       0 |         -inf         -inf 
       0 |          inf          inf 
       0 |         -nan         -nan 
       1 |         -nan         -nan 

Parameter Block 1, size: 3

       0 |         -nan         -nan 
     0.1 |         -nan         -nan 
       0 |         -inf         -inf 

Parameter Block 2, size: 3

   1.381 | Not Computed  Not Computed  
    0.23 | Not Computed  Not Computed  
       0 | Not Computed  Not Computed  

E0430 23:15:54.525949 8524 trust_region_minimizer.cc:72] Terminating: Residual and Jacobian evaluation failed.

Solver Summary (v 1.14.0-eigen-(3.2.92)-lapack-suitesparse-(4.4.6)-cxsparse-(3.1.4)-eigensparse-openmp-no_tbb)

                                 Original                  Reduced

Parameter blocks 29 2
Parameters 88 7
Effective parameters 87 6
Residual blocks 27 27
Residuals 54 54

Minimizer TRUST_REGION

Dense linear algebra library EIGEN
Trust region strategy LEVENBERG_MARQUARDT

                                    Given                     Used

Linear solver DENSE_QR DENSE_QR
Threads 1 1
Linear solver ordering AUTOMATIC 2

Cost:
Initial -1.000000e+00

Minimizer iterations 0
Successful steps 0
Unsuccessful steps 0

Time (in seconds):
Preprocessor 0.000035

Residual only evaluation 0.000000 (0)
Jacobian & residual evaluation 0.000157 (1)
Linear solver 0.000000 (0)
Minimizer 0.000183

Postprocessor 0.000004
Total 0.000222

Termination: FAILURE (Residual and Jacobian evaluation failed.)

After Optimization:
R =
1 0 0
0 1 0
0 0 1
t =
0 0.1 0
Save optimized result in data/calibration_result.txt[calibration-1] process has finished cleanly
log file: /home/tent/.ros/log/836ba458-6b54-11e9-8d5c-fcaa1443ac50/calibration-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete
done
`

@TurtleZhong
Copy link
Owner

TurtleZhong commented Apr 30, 2019 via email

@Kris-Zh
Copy link
Author

Kris-Zh commented May 1, 2019

好的 感谢学长的耐心指导!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants