GithubHelp home page GithubHelp logo

Comments (13)

ZacharyTaylor avatar ZacharyTaylor commented on July 26, 2024
  1. Mesh blocks are sent out every time a section of the map changes. In many cases these blocks will only contain empty space, however we still send these blocks to rviz in case there was previously something meshed in this location that needs to be cleared from the display. As long as things are visualizing correctly this shouldn't be an issue.

Also Voxblox has a parameter called world_frame you can use to set the frame the map is published in.

  1. When Voxblox goes to integrate a new pointcloud it will look up the transform from the corresponding time. If all of the transforms are older than the pointcloud, it will print a warning. Again, as long as you only get this now and then and not every frame it isn't a major issue.

from voxblox.

JiaruiWang-Jill avatar JiaruiWang-Jill commented on July 26, 2024

Thanks a lot, @ZacharyTaylor .

Can I ask one more thing? I am trying to connect orbslam2_ros with voxblex together using one Kinect v1 as input.

As for the parameter file, I use file with different format from voxblox's. For instance, in orbslam2, the parameter file look like
screenshot from 2018-08-19 10-05-34

But I am confused of how to merge these information into our format as follow,

actually T_R_C (C = cam0, R = rgbd cam)
T_B_C:

  • [1.0, 0.0, 0.0, 0.0]
  • [0.0, 1.0, 0.0, 0.0]
  • [0.0, 0.0, 1.0, 0.0]
  • [0.0, 0.0, 0.0, 1.0]
    invert_T_B_C: false

actually T_V_C (C = cam0, V = vicon)
T_B_D:

  • [0.971048, -0.120915, 0.206023, 0.00114049]
  • [0.15701, 0.973037, -0.168959, 0.0450936]
  • [-0.180038, 0.196415, 0.96385, 0.0430765]
  • [0.0, 0.0, 0.0, 1.0]
    invert_T_B_D: true

Although I know that intrinsic matrix's structure is like

fx s cx 0
0 fy cy 0
0 0 1 0
0 0 0 1

I fail to make it as one input of our format. Look forward to your reply and thx in advance!

from voxblox.

ZacharyTaylor avatar ZacharyTaylor commented on July 26, 2024

No problem. So if you are using the same sensor as both your source of depth and motion estimation than you don't actually need to set T_B_C or T_B_D (because they are both identity). These are only used if you have your tracking done in a different fixed frame to your depth information (for example tracking using a motion capture system as was done for the lady_and_cow dataset).

Also for future reference these are 4x4 extrinsic transformations between the sensors and unrelated to the camera intrinsics.

from voxblox.

JiaruiWang-Jill avatar JiaruiWang-Jill commented on July 26, 2024

Sincere thank again! @ZacharyTaylor I set TBC and TBD both into identity matrix.

I am trying to save generated mesh as ply file. I tried by adding

arg name="generate_mesh" default="true" /

into my launch file.

But this service uses empty request and response, which means if I check, terminal show as follows.
When I play rosservice info /voxblox_node/generate_mesh
Terminal shows

Node: /voxblox_node
URI: rosrpc://love-mua:52587
Type: std_srvs/Empty
Args: 

rossrv show std_srvs/Empty

---

Could you give any hints on how to save the generated mesh instead of updating mesh? Really sorry to bother you so many times.

Here is my launch file.
try (copy).launch.txt

from voxblox.

JiaruiWang-Jill avatar JiaruiWang-Jill commented on July 26, 2024

Hi, @ZacharyTaylor Thanks a lot!

I still fail to use generate_mesh service to save the mesh file.

Instead, I write one cpp to subscribe /voxblox_node/mesh topic to save it. But I fail to catkin build. The error message says

error: __s_getMD5Sum is not a member of voxblox::Mesh
      return M::__s_getMD5Sum().c_str();

I think it is because ros fail to recognize this message type. But I donno how to fix it.

Below is my cmakelist file in voxblox_ros folder. And the cpp file I wrote.
CMakeLists.txt

Can you give any suggestions on this bug?
meshsubscriber .cc.txt

from voxblox.

ZacharyTaylor avatar ZacharyTaylor commented on July 26, 2024

@JillWangJill when you call the generate_mesh command the mesh will be saved as a ply file in the path set by mesh_filename. In your case this is set to <param name="mesh_filename" value="$(find voxblox_ros)/mesh_results/$(anon cow).ply" />.

However, I believe that the folder mesh_results doesn't exist by default and the output won't create a folder which is why it is failing. Either change the path of create the folder and it should work.

Also there is no need to write your own voxblox_mesh to ply mesh function. We already have them written and kept here https://github.com/ethz-asl/voxblox/tree/master/voxblox/include/voxblox/io

from voxblox.

JiaruiWang-Jill avatar JiaruiWang-Jill commented on July 26, 2024

Dear @ZacharyTaylor ,

Thanks a lot! However, after I change the mesh_filename into absolute path, the saving procedure still fail. After I use ctrl+c to close the terminal running roslaunch voxblox_ros try.launch, I cant find corresponding file in my folder.
try (copy).launch.txt

Help, please! Thanks in advance!

from voxblox.

ZacharyTaylor avatar ZacharyTaylor commented on July 26, 2024

Does voxblox output an error to the console, if so what does it say?

from voxblox.

JiaruiWang-Jill avatar JiaruiWang-Jill commented on July 26, 2024

Here is the output in voxblox console.
ouput.txt

from voxblox.

helenol avatar helenol commented on July 26, 2024

Did you call the generate_mesh service?
It should output either "Output file as PLY:" or "Failed to output mesh as PLY:" when you call the service in the console.

from voxblox.

JiaruiWang-Jill avatar JiaruiWang-Jill commented on July 26, 2024

@helenol @ZacharyTaylor
Thanks a lot!!!!!!!!!!!!!!!!!!!!
I open another terminal and input rosservice call /voxblox_node/generate_mesh "{}" . The mesh is saved successfully.

Really sorry to bother so many times and thanks again!

from voxblox.

helenol avatar helenol commented on July 26, 2024

Glad it worked! :)

from voxblox.

joerowelll avatar joerowelll commented on July 26, 2024

Generate mesh not working and no specific error message.

I am having a similar problem in that when I call

rosservice call /voxblox_ros generate mesh "{}"

The terminal outputs:

[ INFO] [1669558636.596380639]: Failed to output mesh as PLY: $PATH/mickie_ori_28672_303483_1396867906941177706.ply
[ INFO] [1669558636.596517636]: Mesh Timings: 
SM Timing
-----------
mesh/generate	      2	00.005219	(00.002609 +- 00.000137)	[00.002472,00.002746]
mesh/output  	      2	00.000028	(00.000014 +- 00.000010)	[00.000004,00.000025]
mesh/publish 	     72	00.001090	(00.000015 +- 00.000007)	[00.000007,00.000046]
mesh/update  	     70	00.123028	(00.001758 +- 00.000844)	[00.000852,00.004013]

[ INFO] [1669558637.376771854]: Updating mesh.

My launch file is as follows:

<launch>
  <arg name="play_bag" default="true" />
  <!-- <arg name="bag_file" default="/$PATH.bag"/> -->
  <arg name="voxel_size" default="0.05"/>

  <arg name="bag_file" default="$PATH.bag"/>
  <node name="player" pkg="rosbag" type="play" output="screen" args="-r 1.0 --clock $(arg bag_file)" if="$(arg play_bag)"/>

   <node name="voxblox_node" pkg="voxblox_ros" type="tsdf_server" output="screen" args="-alsologtostderr" clear_params="true">
    <remap from="pointcloud" to="/camera/depth_registered/points"/>
    <param name="tsdf_voxel_size" value="$(arg voxel_size)" />
    <param name="tsdf_voxels_per_side" value="16" />
    <param name="voxel_carving_enabled" value="true" />
    <param name="color_mode" value="color" />
    <param name="use_tf_transforms" value="false" />
    <param name="update_mesh_every_n_sec" value="1.0" />
    <param name="min_time_between_msgs_sec" value="0.0" />
    <param name="method" value="fast" />
    <param name="use_const_weight" value="false" />
    <param name="allow_clear" value="true" />
    <param name="verbose" value="true" />    
    <remap from="transform" to="/kinect/vrpn_client/estimated_transform" />
    <rosparam file="$(find voxblox_ros)/cfg/mickie.yaml"/>
    <param name="generate_mesh" value="true" />
    <param name="output_mesh_as_pcl_mesh" value="true" />
    <param name="mesh_filename" value="$(find voxblox_ros)/mesh_results/$(anon mickie6).ply" />
  </node>

</launch> 

The folder in which the mesh is saved exists, and it has worked with the cow and lady rosbag. Any ideas?

from voxblox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.