Closed WuZihao12 closed 2 years ago
What the client receives is always the identity matrix
Hi, That seems strange. The identity matrix is the default value https://github.com/VIS4ROB-lab/covins/blob/f505b45e2d23734b2a4d58fc36dd4e2987090884/covins_comm/include/covins/covins_base/msgs/msg_keyframe.hpp#L93 so I assume it does not correctly store the value in the message.
Can you check if after converting the KF to the message, the message really contains the correct value of T_w_s_
. So check msg_kf
after here
https://github.com/VIS4ROB-lab/covins/blob/e21f25992369d39c9abb920259dd8fef3f30d973/covins_backend/src/covins_backend/communicator_be.cpp#L66
Btw. it's not good practice to add screenshots of code, instead link to the line of code in the corresponding file (as I did). Otherwise it can be quite hard to figure out which part of code from which file you are referencing to. See here how this can be done.
Thanks for your suggestion. I just tried it,after converting the KF to the message,the message msg_kf really contains the correct value of T_ws.
https://github.com/VIS4ROB-lab/covins/blob/e21f25992369d39c9abb920259dd8fef3f30d973/covins_backend/src/covins_backend/communicator_be.cpp#L66 I added the test output code under this line of code: std::cout << "msg_kf: \n" << msg_kf.T_w_s << std::endl; I see that it outputs not an identity matrix.
Then the problem is in the transmission. And I just checked and it looks like this parameter is not defined in the serialization (which means it is not transmitted).
You probably just need to add T_w_s
after e.g. T_sref_s
in the serialization save
https://github.com/VIS4ROB-lab/covins/blob/f505b45e2d23734b2a4d58fc36dd4e2987090884/covins_comm/include/covins/covins_base/msgs/msg_keyframe.hpp#L136-L139
and load method
https://github.com/VIS4ROB-lab/covins/blob/f505b45e2d23734b2a4d58fc36dd4e2987090884/covins_comm/include/covins/covins_base/msgs/msg_keyframe.hpp#L172-L175
Edit:
The methods above are only for updated KF messages. If you need this variable also for new KFs (so the first time they are sent to the server) you need need to add T_w_s
also in the following methods:
https://github.com/VIS4ROB-lab/covins/blob/f505b45e2d23734b2a4d58fc36dd4e2987090884/covins_comm/include/covins/covins_base/msgs/msg_keyframe.hpp#L141-L152
https://github.com/VIS4ROB-lab/covins/blob/f505b45e2d23734b2a4d58fc36dd4e2987090884/covins_comm/include/covins/covins_base/msgs/msg_keyframe.hpp#L177-L188
Thanks for your answer, I know the reason for the problem.
Okay, in this case I close this issue. Feel free to reopen it if you encounter additional problems related to this issue.
Hello, I want to transmit msg.T_w_s = T_ws from the server to the client; but the client always receives the unit array. why this msg.T_sref_s = T_w_sref.inverse() * T_ws; can be transmitted![Screenshot from 2022-06-08 16-58-56](https://user-images.githubusercontent.com/76829676/172576607-ef2cdb83-cabc-4fb2-8ef0-7a1d1acd77e9.png)