Open yuchen-ji opened 2 years ago
No, we use PyRender for visualization. Rviz needs path to the STL file, which means one need to first save the 3D mesh at every time instant and save it in STL format. Then, a publisher should publish the paths to these files and Rviz should subscribe to these topics. This is quite inconvenient. If you want to visualize SMPL in interactive 3D, I would recommend blender python module or meshcat-python.
Thanks a lot! Subscribing the topic of the path of stl file is really inconvenient. I think that could i use deep-learing model to predict the joint's angle of human. then publish the joint's angle. while Rviz subscribe it to visualize the human pose? I notice that rivz describe the robot model with rigid joints, while smpl model for blender is a mesh with skeleton, could rviz support this description method?
Sorry, but I don't have enough experience with rviz to answer that question. Most probably, such visualization cannot be done in rviz. If you are ok with another way of visualizing then maybe use meshcat and write a subscriber around it. The subscriber subscribes to the SMPL parameters and converts them to vertices. These vertices can be used by meshcat for visualization.
Thanks a lot! Subscribing the topic of the path of stl file is really inconvenient. I think that could i use deep-learing model to predict the joint's angle of human. then publish the joint's angle. while Rviz subscribe it to visualize the human pose? I notice that rivz describe the robot model with rigid joints, while smpl model for blender is a mesh with skeleton, could rviz support this description method?
If you want to visualize the joint position and orientation you can use pose array messages (https://wiki.ros.org/rviz/DisplayTypes/PoseArray) both the arrow/axes visualization might serve your purpose.
The process is
A minimal working example with python is here.
Using a robot model I think it's not possible, even if you use rotational joints(which exists) because each visualization unit in rviz should be attached to a rigid mesh
Sorry, but I don't have enough experience with rviz to answer that question. Most probably, such visualization cannot be done in rviz. If you are ok with another way of visualizing then maybe use meshcat and write a subscriber around it. The subscriber subscribes to the SMPL parameters and converts them to vertices. These vertices can be used by meshcat for visualization.
thank you very much! I am going to find some more ways~
Thanks a lot! Subscribing the topic of the path of stl file is really inconvenient. I think that could i use deep-learing model to predict the joint's angle of human. then publish the joint's angle. while Rviz subscribe it to visualize the human pose? I notice that rivz describe the robot model with rigid joints, while smpl model for blender is a mesh with skeleton, could rviz support this description method?
If you want to visualize the joint position and orientation you can use pose array messages (https://wiki.ros.org/rviz/DisplayTypes/PoseArray) both the arrow/axes visualization might serve your purpose.
The process is
- generate the data
- populate the message
- publish it
- visualize it in rviz
A minimal working example with python is here.
Using a robot model I think it's not possible, even if you use rotational joints(which exists) because each visualization unit in rviz should be attached to a rigid mesh
Thanks for your detailed reply! This way may only visiualize the joints or angles position, right? I want to visiualize a mesh model which can be transformed by joints position or angles, how could i realized it? Thank you, sincerely~
I don't think that's possible. As far as I know the meshes are rigid in rviz, so for a body model you should stripe it down to different pieces>associate to different joints>move the joints. But it won't work easily.
A thing you can explore is https://wiki.ros.org/mesh_tools and create the mesh offline and publish it.
Or associate to each vertex a "cube", use visualization marker, and publish the list of cubes. You won't see a super smooth thing but you'll get the idea. I think it can handle 6900 cubes
Using this https://wiki.ros.org/rviz/DisplayTypes/Marker#Mesh_Resource_.28MESH_RESOURCE.3D10.29_.5B1.1.2B-.5D might even work if you take every n-th vertex.
Or you can look into this https://github.com/marip8/colorized_mesh_display. I've never tried though sorry.
I don't think that's possible. As far as I know the meshes are rigid in rviz, so for a body model you should stripe it down to different pieces>associate to different joints>move the joints. But it won't work easily.
A thing you can explore is https://wiki.ros.org/mesh_tools and create the mesh offline and publish it.
Or associate to each vertex a "cube", use visualization marker, and publish the list of cubes. You won't see a super smooth thing but you'll get the idea. I think it can handle 6900 cubes
Using this https://wiki.ros.org/rviz/DisplayTypes/Marker#Mesh_Resource_.28MESH_RESOURCE.3D10.29_.5B1.1.2B-.5D might even work if you take every n-th vertex.
Or you can look into this https://github.com/marip8/colorized_mesh_display. I've never tried though sorry.
OK! thank you so much, i will have a try~
Thanks for your great works! I have a little questions, i just learn a little about ROS, can your project realize the visualization of smpl model in Rviz?