stevenjj / openpose_ros

A ros wrapper for the CMU openpose library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

3d skeleton extraction stopped with kinect xbox 360

amalgmar12 opened this issue · comments

Hi,

 I want to use 3d Detection Module with kinect xbox 360 , I run 
               roslaunch openni_launch openni.launch device_id:=#2 

to publish the openni node and it was published. Then I publish 3D extractor node with this command
roslaunch skeleton_extract_3d openpose_skeleton_extract.launch
and this node is initialized and during Preparation for forward pass , the 2d coefficients and the 3d skelton were published but after that the pocess stopped . Can you help me to fix this problem ? because I need to extract 3d skelton in real time during the whole day . Bellow the error.

ubuntu Version : Elementary Os
Opencv : 3.1
cuda : 8.0
kinect : xbox 360
Openni v1
screenshot from 2018-04-02 11-36-10

    thank you in advance

Hi. Try using a different point cloud topic. The skeleton 3d node expects a depth registered point cloud since we use the same indices for locating the body parts from the rgb image and the point cloud.

The error may be caused from accessing invalid indices which can occur if an incorrect point cloud data structure is given.

Thank you for your answer , but I just reduce the size of the setting camera to :
output_size.x = getParam(local_nh, "output_width", 200);
output_size.y = getParam(local_nh, "output_height", 200);
and the error disappear . does it affect the precision of skeleton extraction ? Thank you for your understanding

The image size in terms of width and length in pixels must match the index size of the depth registered points' length and width. Does this make sense? Otherwise the skeleton will be in the wrong 3D location.

If you're unsure, just make sure that the output size is the same size as your rgb color image in pixels and make sure that you're using the correct point cloud message (depth registered).

I put the same size as my rgb color image in pixels 640*480 , and
remap from="~point_cloud" to="/camera/depth_registered/points" .
But the problem is not fixed :/

What did you write for output_size.x and output_size.y?

output_size.x = getParam(local_nh, "output_width", 480);
output_size.y = getParam(local_nh, "output_height", 640);
and these are my topics:
/camera/depth/camera_info
/camera/depth/disparity
/camera/depth/image
/camera/depth/image/compressed
/camera/depth/image/compressed/parameter_descriptions
/camera/depth/image/compressed/parameter_updates
/camera/depth/image/compressedDepth
/camera/depth/image/compressedDepth/parameter_descriptions
/camera/depth/image/compressedDepth/parameter_updates
/camera/depth/image/theora
/camera/depth/image/theora/parameter_descriptions
/camera/depth/image/theora/parameter_updates
/camera/depth/image_raw
/camera/depth/image_raw/compressed
/camera/depth/image_raw/compressed/parameter_descriptions
/camera/depth/image_raw/compressed/parameter_updates
/camera/depth/image_raw/compressedDepth
/camera/depth/image_raw/compressedDepth/parameter_descriptions
/camera/depth/image_raw/compressedDepth/parameter_updates
/camera/depth/image_raw/theora
/camera/depth/image_raw/theora/parameter_descriptions
/camera/depth/image_raw/theora/parameter_updates
/camera/depth/image_rect
/camera/depth/image_rect/compressed
/camera/depth/image_rect/compressed/parameter_descriptions
/camera/depth/image_rect/compressed/parameter_updates
/camera/depth/image_rect/compressedDepth
/camera/depth/image_rect/compressedDepth/parameter_descriptions
/camera/depth/image_rect/compressedDepth/parameter_updates
/camera/depth/image_rect/theora
/camera/depth/image_rect/theora/parameter_descriptions
/camera/depth/image_rect/theora/parameter_updates
/camera/depth/image_rect_raw
/camera/depth/image_rect_raw/compressed
/camera/depth/image_rect_raw/compressed/parameter_descriptions
/camera/depth/image_rect_raw/compressed/parameter_updates
/camera/depth/image_rect_raw/compressedDepth
/camera/depth/image_rect_raw/compressedDepth/parameter_descriptions
/camera/depth/image_rect_raw/compressedDepth/parameter_updates
/camera/depth/image_rect_raw/theora
/camera/depth/image_rect_raw/theora/parameter_descriptions
/camera/depth/image_rect_raw/theora/parameter_updates
/camera/depth/points
/camera/depth_rectify_depth/parameter_descriptions
/camera/depth_rectify_depth/parameter_updates
/camera/depth_registered/camera_info
/camera/depth_registered/disparity
/camera/depth_registered/hw_registered/image_rect
/camera/depth_registered/hw_registered/image_rect/compressed
/camera/depth_registered/hw_registered/image_rect/compressed/parameter_descriptions
/camera/depth_registered/hw_registered/image_rect/compressed/parameter_updates
/camera/depth_registered/hw_registered/image_rect/compressedDepth
/camera/depth_registered/hw_registered/image_rect/compressedDepth/parameter_descriptions
/camera/depth_registered/hw_registered/image_rect/compressedDepth/parameter_updates
/camera/depth_registered/hw_registered/image_rect/theora
/camera/depth_registered/hw_registered/image_rect/theora/parameter_descriptions
/camera/depth_registered/hw_registered/image_rect/theora/parameter_updates
/camera/depth_registered/hw_registered/image_rect_raw
/camera/depth_registered/hw_registered/image_rect_raw/compressed
/camera/depth_registered/hw_registered/image_rect_raw/compressed/parameter_descriptions
/camera/depth_registered/hw_registered/image_rect_raw/compressed/parameter_updates
/camera/depth_registered/hw_registered/image_rect_raw/compressedDepth
/camera/depth_registered/hw_registered/image_rect_raw/compressedDepth/parameter_descriptions
/camera/depth_registered/hw_registered/image_rect_raw/compressedDepth/parameter_updates
/camera/depth_registered/hw_registered/image_rect_raw/theora
/camera/depth_registered/hw_registered/image_rect_raw/theora/parameter_descriptions
/camera/depth_registered/hw_registered/image_rect_raw/theora/parameter_updates
/camera/depth_registered/image
/camera/depth_registered/image/compressed
/camera/depth_registered/image/compressed/parameter_descriptions
/camera/depth_registered/image/compressed/parameter_updates
/camera/depth_registered/image/compressedDepth
/camera/depth_registered/image/compressedDepth/parameter_descriptions
/camera/depth_registered/image/compressedDepth/parameter_updates
/camera/depth_registered/image/theora
/camera/depth_registered/image/theora/parameter_descriptions
/camera/depth_registered/image/theora/parameter_updates
/camera/depth_registered/image_raw
/camera/depth_registered/image_raw/compressed
/camera/depth_registered/image_raw/compressed/parameter_descriptions
/camera/depth_registered/image_raw/compressed/parameter_updates
/camera/depth_registered/image_raw/compressedDepth
/camera/depth_registered/image_raw/compressedDepth/parameter_descriptions
/camera/depth_registered/image_raw/compressedDepth/parameter_updates
/camera/depth_registered/image_raw/theora
/camera/depth_registered/image_raw/theora/parameter_descriptions
/camera/depth_registered/image_raw/theora/parameter_updates
/camera/depth_registered/points
/camera/depth_registered/sw_registered/camera_info
/camera/depth_registered/sw_registered/image_rect
/camera/depth_registered/sw_registered/image_rect/compressed
/camera/depth_registered/sw_registered/image_rect/compressed/parameter_descriptions
/camera/depth_registered/sw_registered/image_rect/compressed/parameter_updates
/camera/depth_registered/sw_registered/image_rect/compressedDepth
/camera/depth_registered/sw_registered/image_rect/compressedDepth/parameter_descriptions
/camera/depth_registered/sw_registered/image_rect/compressedDepth/parameter_updates
/camera/depth_registered/sw_registered/image_rect/theora
/camera/depth_registered/sw_registered/image_rect/theora/parameter_descriptions
/camera/depth_registered/sw_registered/image_rect/theora/parameter_updates
/camera/depth_registered/sw_registered/image_rect_raw
/camera/depth_registered/sw_registered/image_rect_raw/compressed
/camera/depth_registered/sw_registered/image_rect_raw/compressed/parameter_descriptions
/camera/depth_registered/sw_registered/image_rect_raw/compressed/parameter_updates
/camera/depth_registered/sw_registered/image_rect_raw/compressedDepth
/camera/depth_registered/sw_registered/image_rect_raw/compressedDepth/parameter_descriptions
/camera/depth_registered/sw_registered/image_rect_raw/compressedDepth/parameter_updates
/camera/depth_registered/sw_registered/image_rect_raw/theora
/camera/depth_registered/sw_registered/image_rect_raw/theora/parameter_descriptions
/camera/depth_registered/sw_registered/image_rect_raw/theora/parameter_updates
/camera/depth_registered_rectify_depth/parameter_descriptions
/camera/depth_registered_rectify_depth/parameter_updates
/camera/driver/parameter_descriptions
/camera/driver/parameter_updates
/camera/ir/camera_info
/camera/ir/image_raw
/camera/ir/image_raw/compressed
/camera/ir/image_raw/compressed/parameter_descriptions
/camera/ir/image_raw/compressed/parameter_updates
/camera/ir/image_raw/compressedDepth
/camera/ir/image_raw/compressedDepth/parameter_descriptions
/camera/ir/image_raw/compressedDepth/parameter_updates
/camera/ir/image_raw/theora
/camera/ir/image_raw/theora/parameter_descriptions
/camera/ir/image_raw/theora/parameter_updates
/camera/ir/image_rect_ir
/camera/ir/image_rect_ir/compressed
/camera/ir/image_rect_ir/compressed/parameter_descriptions
/camera/ir/image_rect_ir/compressed/parameter_updates
/camera/ir/image_rect_ir/compressedDepth
/camera/ir/image_rect_ir/compressedDepth/parameter_descriptions
/camera/ir/image_rect_ir/compressedDepth/parameter_updates
/camera/ir/image_rect_ir/theora
/camera/ir/image_rect_ir/theora/parameter_descriptions
/camera/ir/image_rect_ir/theora/parameter_updates
/camera/ir_rectify_ir/parameter_descriptions
/camera/ir_rectify_ir/parameter_updates
/camera/projector/camera_info
/camera/rgb/camera_info
/camera/rgb/image_color
/camera/rgb/image_color/compressed
/camera/rgb/image_color/compressed/parameter_descriptions
/camera/rgb/image_color/compressed/parameter_updates
/camera/rgb/image_color/compressedDepth
/camera/rgb/image_color/compressedDepth/parameter_descriptions
/camera/rgb/image_color/compressedDepth/parameter_updates
/camera/rgb/image_color/theora
/camera/rgb/image_color/theora/parameter_descriptions
/camera/rgb/image_color/theora/parameter_updates
/camera/rgb/image_mono
/camera/rgb/image_mono/compressed
/camera/rgb/image_mono/compressed/parameter_descriptions
/camera/rgb/image_mono/compressed/parameter_updates
/camera/rgb/image_mono/compressedDepth
/camera/rgb/image_mono/compressedDepth/parameter_descriptions
/camera/rgb/image_mono/compressedDepth/parameter_updates
/camera/rgb/image_mono/theora
/camera/rgb/image_mono/theora/parameter_descriptions
/camera/rgb/image_mono/theora/parameter_updates
/camera/rgb/image_raw
/camera/rgb/image_raw/compressed
/camera/rgb/image_raw/compressed/parameter_descriptions
/camera/rgb/image_raw/compressed/parameter_updates
/camera/rgb/image_raw/compressedDepth
/camera/rgb/image_raw/compressedDepth/parameter_descriptions
/camera/rgb/image_raw/compressedDepth/parameter_updates
/camera/rgb/image_raw/theora
/camera/rgb/image_raw/theora/parameter_descriptions
/camera/rgb/image_raw/theora/parameter_updates
/camera/rgb/image_rect_color
/camera/rgb/image_rect_color/compressed
/camera/rgb/image_rect_color/compressed/parameter_descriptions
/camera/rgb/image_rect_color/compressed/parameter_updates
/camera/rgb/image_rect_color/compressedDepth
/camera/rgb/image_rect_color/compressedDepth/parameter_descriptions
/camera/rgb/image_rect_color/compressedDepth/parameter_updates
/camera/rgb/image_rect_color/theora
/camera/rgb/image_rect_color/theora/parameter_descriptions
/camera/rgb/image_rect_color/theora/parameter_updates
/camera/rgb/image_rect_mono
/camera/rgb/image_rect_mono/compressed
/camera/rgb/image_rect_mono/compressed/parameter_descriptions
/camera/rgb/image_rect_mono/compressed/parameter_updates
/camera/rgb/image_rect_mono/compressedDepth
/camera/rgb/image_rect_mono/compressedDepth/parameter_descriptions
/camera/rgb/image_rect_mono/compressedDepth/parameter_updates
/camera/rgb/image_rect_mono/theora
/camera/rgb/image_rect_mono/theora/parameter_descriptions
/camera/rgb/image_rect_mono/theora/parameter_updates
/camera/rgb_debayer/parameter_descriptions
/camera/rgb_debayer/parameter_updates
/camera/rgb_rectify_color/parameter_descriptions
/camera/rgb_rectify_color/parameter_updates
/camera/rgb_rectify_mono/parameter_descriptions
/camera/rgb_rectify_mono/parameter_updates
/openpose_ros/skeleton_3d/detected_poses_keypoints_3d
/openpose_ros/skeleton_3d/input_pointcloud
/openpose_ros/skeleton_3d/input_rgb
/rosout
/rosout_agg
/tf
/tf_static

Thank you so much for your time :)

Hm, try:

output_size.x = getParam(local_nh, "output_width", 640);
output_size.y = getParam(local_nh, "output_height", 480);

and use

/camera/depth_registered/points

The same problem :/

Ok, please put some print statements in the skeleton 3d node and tell me where it fails. I think that will give us a better idea of your problem.

I changed this in skeleton 3d node:
// Set resolution

#define width 640
#define height 480
The problem disappear .Do you think that it is fixed ?

Most likely. I assumed that you have already updated this. Let me know if you can visualize the 3D skeleton markers in rviz.

Hi,
sorry for answering you late . Yes , I can visualize 3d skeleton markers in Rviz , But it is slow , Do you think that it 's because I reduce the size of Network . Thank you for your big effort :)

I would be grateful if you answer me the last question , how can I write the detected_poses_keypoints_3d message in a .csv file ? . Thank you very much

Hi. That's great to hear.

In terms of speed, the code is not optimized and currently we are using the point cloud message to extract the 3D points instead of using the more space-efficient depth image message to calculate the 3D points. The copy operation ROS does for messages plus the unoptimized calculations take time.

As for writing it in a .csv file, using C++'s fstream library should be the easiest route. See here for a more example: (http://www.cplusplus.com/doc/tutorial/files/)

In any case, this issue looks resolved so I will be closing it. Feel free to open a new issue to discuss a different topic.

commented

I tried to run skelton_extract_3d, It occurs error.
I am using Realsense D435.
$ roslaunch realsense2_camera rs_rgbd.launch
$ roslaunch skeleton_extract_3d openpose_skeleton_extract.launch

skeleton_extract_3d-launch-

These are what I did before runnig roslaunch.
①I modified openpose_ros_node_firephinx
DEFINE_string(camera_topic, "/camera/color/image_raw", "Image topic that OpenPose will process.");

②Modified skeleton_extract_3d_node.cpp
#define width 1280
#define height 720

③Modified skeleton_extract_3d_visualization_node.cpp
marker.header.frame_id = "/camera_link";

④According to #8 I modified openpose_ros_node, openpose_ros_node_3d,
output_size.x = getParam(local_nh, "output_width", 1280);
output_size.y = getParam(local_nh, "output_height", 720);

⑤And I modified launch file which can use my depth camera.
<remap from="~point_cloud" to="/camera/depth_registered/points" />
<remap from="~image" to="/camera/color/image_raw" />

Could you give me some advice on solve this problem?

@makino-ryota : I suspect the issue is with these topics

<remap from="~point_cloud" to="/camera/depth_registered/points" />
<remap from="~image" to="/camera/color/image_raw" />

Can you run these commands in the terminal?

rostopic list | grep camera

This should list the camera output topics. Can you post it here?

Use point cloud and camera topics that are registered with depth. Topics with rectified in them might also work. Which means a point in the point cloud corresponds to a pixel in the camera image.

commented

@stevenjj Thank you for advise.

When I run this roslaunch.
$ roslaunch realsense2_camera rs_rgbd.launch

$ rostopic list | grep camera
/camera/RGB_Camera/parameter_descriptions
/camera/RGB_Camera/parameter_updates
/camera/Stereo_Module/parameter_descriptions
/camera/Stereo_Module/parameter_updates
/camera/aligned_depth_to_color/camera_info
/camera/aligned_depth_to_color/image_raw
/camera/aligned_depth_to_color/image_raw/compressed
/camera/aligned_depth_to_color/image_raw/compressed/parameter_descriptions
/camera/aligned_depth_to_color/image_raw/compressed/parameter_updates
/camera/aligned_depth_to_color/image_raw/compressedDepth
/camera/aligned_depth_to_color/image_raw/compressedDepth/parameter_descriptions
/camera/aligned_depth_to_color/image_raw/compressedDepth/parameter_updates
/camera/aligned_depth_to_color/image_raw/theora
/camera/aligned_depth_to_color/image_raw/theora/parameter_descriptions
/camera/aligned_depth_to_color/image_raw/theora/parameter_updates
/camera/aligned_depth_to_infra1/camera_info
/camera/aligned_depth_to_infra1/image_raw
/camera/aligned_depth_to_infra1/image_raw/compressed
/camera/aligned_depth_to_infra1/image_raw/compressed/parameter_descriptions
/camera/aligned_depth_to_infra1/image_raw/compressed/parameter_updates
/camera/aligned_depth_to_infra1/image_raw/compressedDepth
/camera/aligned_depth_to_infra1/image_raw/compressedDepth/parameter_descriptions
/camera/aligned_depth_to_infra1/image_raw/compressedDepth/parameter_updates
/camera/aligned_depth_to_infra1/image_raw/theora
/camera/aligned_depth_to_infra1/image_raw/theora/parameter_descriptions
/camera/aligned_depth_to_infra1/image_raw/theora/parameter_updates
/camera/aligned_depth_to_infra2/camera_info
/camera/aligned_depth_to_infra2/image_raw
/camera/aligned_depth_to_infra2/image_raw/compressed
/camera/aligned_depth_to_infra2/image_raw/compressed/parameter_descriptions
/camera/aligned_depth_to_infra2/image_raw/compressed/parameter_updates
/camera/aligned_depth_to_infra2/image_raw/compressedDepth
/camera/aligned_depth_to_infra2/image_raw/compressedDepth/parameter_descriptions
/camera/aligned_depth_to_infra2/image_raw/compressedDepth/parameter_updates
/camera/aligned_depth_to_infra2/image_raw/theora
/camera/aligned_depth_to_infra2/image_raw/theora/parameter_descriptions
/camera/aligned_depth_to_infra2/image_raw/theora/parameter_updates
/camera/color/camera_info
/camera/color/image_raw
/camera/color/image_raw/compressed
/camera/color/image_raw/compressed/parameter_descriptions
/camera/color/image_raw/compressed/parameter_updates
/camera/color/image_raw/compressedDepth
/camera/color/image_raw/compressedDepth/parameter_descriptions
/camera/color/image_raw/compressedDepth/parameter_updates
/camera/color/image_raw/theora
/camera/color/image_raw/theora/parameter_descriptions
/camera/color/image_raw/theora/parameter_updates
/camera/color/image_rect_color
/camera/color/image_rect_color/compressed
/camera/color/image_rect_color/compressed/parameter_descriptions
/camera/color/image_rect_color/compressed/parameter_updates
/camera/color/image_rect_color/compressedDepth
/camera/color/image_rect_color/compressedDepth/parameter_descriptions
/camera/color/image_rect_color/compressedDepth/parameter_updates
/camera/color/image_rect_color/theora
/camera/color/image_rect_color/theora/parameter_descriptions
/camera/color/image_rect_color/theora/parameter_updates
/camera/color_rectify_color/parameter_descriptions
/camera/color_rectify_color/parameter_updates
/camera/depth/camera_info
/camera/depth/image_rect_raw
/camera/depth/image_rect_raw/compressed
/camera/depth/image_rect_raw/compressed/parameter_descriptions
/camera/depth/image_rect_raw/compressed/parameter_updates
/camera/depth/image_rect_raw/compressedDepth
/camera/depth/image_rect_raw/compressedDepth/parameter_descriptions
/camera/depth/image_rect_raw/compressedDepth/parameter_updates
/camera/depth/image_rect_raw/theora
/camera/depth/image_rect_raw/theora/parameter_descriptions
/camera/depth/image_rect_raw/theora/parameter_updates
/camera/depth_registered/points
/camera/extrinsics/depth_to_color
/camera/extrinsics/depth_to_infra1
/camera/extrinsics/depth_to_infra2
/camera/infra1/camera_info
/camera/infra1/image_rect_raw
/camera/infra1/image_rect_raw/compressed
/camera/infra1/image_rect_raw/compressed/parameter_descriptions
/camera/infra1/image_rect_raw/compressed/parameter_updates
/camera/infra1/image_rect_raw/compressedDepth
/camera/infra1/image_rect_raw/compressedDepth/parameter_descriptions
/camera/infra1/image_rect_raw/compressedDepth/parameter_updates
/camera/infra1/image_rect_raw/theora
/camera/infra1/image_rect_raw/theora/parameter_descriptions
/camera/infra1/image_rect_raw/theora/parameter_updates
/camera/infra2/camera_info
/camera/infra2/image_rect_raw
/camera/infra2/image_rect_raw/compressed
/camera/infra2/image_rect_raw/compressed/parameter_descriptions
/camera/infra2/image_rect_raw/compressed/parameter_updates
/camera/infra2/image_rect_raw/compressedDepth
/camera/infra2/image_rect_raw/compressedDepth/parameter_descriptions
/camera/infra2/image_rect_raw/compressedDepth/parameter_updates
/camera/infra2/image_rect_raw/theora
/camera/infra2/image_rect_raw/theora/parameter_descriptions
/camera/infra2/image_rect_raw/theora/parameter_updates
/camera/realsense2_camera_manager/bond

@makino-ryota Ok.
For the point cloud, try using this topic:

/camera/depth_registered/points

For the image, try using this topic:

/camera/color/image_rect_color
commented

@stevenjj
I modified openpose_skelton_extract.launch
<remap from="~point_cloud" to="/camera/depth_registered/points" />
<remap from="~image" to="/camera/color/image_rect_color" />

and openpose_ros_phinx.cpp
DEFINE_string(camera_topic, "/camera/color/image_rect_color", "Image topic that OpenPose will process.");

The same error occured...
image topic modified

@makino-ryota : According to your error output, the image input is actually 640x480. So change the resolution in the skeleton_extract_3d_node.cpp and openpose_ros_node_3d to use these values.

in skeleton_extract_3d_node.cpp:

#define width 640
#define height 480

and in openpose_ros_node_3d.cpp:

output_size.x = getParam(local_nh, "output_width", 640);
output_size.y = getParam(local_nh, "output_height", 480);
commented

@stevenjj I modified skelton_extract_3d_node.cpp
#define width 640
#define height 480

and openpose_ros_node_3d.cpp
output_size.x = getParam(local_nh, "output_width", 640);
output_size.y = getParam(local_nh, "output_height", 480);

Then openpose_skeleton_extract.launch works well, but skeleton_extract_3d_visualization_node.cpp is something strange in Rviz.
visualize

After that I tried to modify openpose_ros_node_firephinx.cpp

#define OUTPUT_RES_X 640
#define OUTPUT_RES_Y 480

and openpose_ros_node.cpp
output_size.x = getParam(local_nh, "output_width", 640);
output_size.y = getParam(local_nh, "output_height", 480);

But It was the same output.

@makino-ryota : This looks like the pointcloud topic is not really registered.

The realsense2_camera seems to have many options for launching the node according to https://github.com/intel-ros/realsense/tree/development/realsense2_camera/launch

So, try using different parameters and launch files. For example, try using this when launching your camera:

roslaunch realsense2_camera rs_rgbd.launch align_depth:=true enable_pointcloud:=true

Then again, do

rostopic list | grep

We're looking for other depth registered point cloud topics to use.

commented

@stevenjj : Thank you for searching about realsense2_camera.

I run this roslaunch
$ roslaunch realsense2_camera rs_rgbd.launch align_depth:=true enable_pointcloud:=true

And run this code.

$ rostopic list | grep camera
/camera/RGB_Camera/parameter_descriptions
/camera/RGB_Camera/parameter_updates
/camera/Stereo_Module/parameter_descriptions
/camera/Stereo_Module/parameter_updates
/camera/aligned_depth_to_color/camera_info
/camera/aligned_depth_to_color/image_raw
/camera/aligned_depth_to_color/image_raw/compressed
/camera/aligned_depth_to_color/image_raw/compressed/parameter_descriptions
/camera/aligned_depth_to_color/image_raw/compressed/parameter_updates
/camera/aligned_depth_to_color/image_raw/compressedDepth
/camera/aligned_depth_to_color/image_raw/compressedDepth/parameter_descriptions
/camera/aligned_depth_to_color/image_raw/compressedDepth/parameter_updates
/camera/aligned_depth_to_color/image_raw/theora
/camera/aligned_depth_to_color/image_raw/theora/parameter_descriptions
/camera/aligned_depth_to_color/image_raw/theora/parameter_updates
/camera/aligned_depth_to_infra1/camera_info
/camera/aligned_depth_to_infra1/image_raw
/camera/aligned_depth_to_infra1/image_raw/compressed
/camera/aligned_depth_to_infra1/image_raw/compressed/parameter_descriptions
/camera/aligned_depth_to_infra1/image_raw/compressed/parameter_updates
/camera/aligned_depth_to_infra1/image_raw/compressedDepth
/camera/aligned_depth_to_infra1/image_raw/compressedDepth/parameter_descriptions
/camera/aligned_depth_to_infra1/image_raw/compressedDepth/parameter_updates
/camera/aligned_depth_to_infra1/image_raw/theora
/camera/aligned_depth_to_infra1/image_raw/theora/parameter_descriptions
/camera/aligned_depth_to_infra1/image_raw/theora/parameter_updates
/camera/aligned_depth_to_infra2/camera_info
/camera/aligned_depth_to_infra2/image_raw
/camera/aligned_depth_to_infra2/image_raw/compressed
/camera/aligned_depth_to_infra2/image_raw/compressed/parameter_descriptions
/camera/aligned_depth_to_infra2/image_raw/compressed/parameter_updates
/camera/aligned_depth_to_infra2/image_raw/compressedDepth
/camera/aligned_depth_to_infra2/image_raw/compressedDepth/parameter_descriptions
/camera/aligned_depth_to_infra2/image_raw/compressedDepth/parameter_updates
/camera/aligned_depth_to_infra2/image_raw/theora
/camera/aligned_depth_to_infra2/image_raw/theora/parameter_descriptions
/camera/aligned_depth_to_infra2/image_raw/theora/parameter_updates
/camera/color/camera_info
/camera/color/image_raw
/camera/color/image_raw/compressed
/camera/color/image_raw/compressed/parameter_descriptions
/camera/color/image_raw/compressed/parameter_updates
/camera/color/image_raw/compressedDepth
/camera/color/image_raw/compressedDepth/parameter_descriptions
/camera/color/image_raw/compressedDepth/parameter_updates
/camera/color/image_raw/theora
/camera/color/image_raw/theora/parameter_descriptions
/camera/color/image_raw/theora/parameter_updates
/camera/color/image_rect_color
/camera/color/image_rect_color/compressed
/camera/color/image_rect_color/compressed/parameter_descriptions
/camera/color/image_rect_color/compressed/parameter_updates
/camera/color/image_rect_color/compressedDepth
/camera/color/image_rect_color/compressedDepth/parameter_descriptions
/camera/color/image_rect_color/compressedDepth/parameter_updates
/camera/color/image_rect_color/theora
/camera/color/image_rect_color/theora/parameter_descriptions
/camera/color/image_rect_color/theora/parameter_updates
/camera/color_rectify_color/parameter_descriptions
/camera/color_rectify_color/parameter_updates
/camera/depth/camera_info
/camera/depth/color/points
/camera/depth/image_rect_raw
/camera/depth/image_rect_raw/compressed
/camera/depth/image_rect_raw/compressed/parameter_descriptions
/camera/depth/image_rect_raw/compressed/parameter_updates
/camera/depth/image_rect_raw/compressedDepth
/camera/depth/image_rect_raw/compressedDepth/parameter_descriptions
/camera/depth/image_rect_raw/compressedDepth/parameter_updates
/camera/depth/image_rect_raw/theora
/camera/depth/image_rect_raw/theora/parameter_descriptions
/camera/depth/image_rect_raw/theora/parameter_updates
/camera/depth_registered/points
/camera/extrinsics/depth_to_color
/camera/extrinsics/depth_to_infra1
/camera/extrinsics/depth_to_infra2
/camera/infra1/camera_info
/camera/infra1/image_rect_raw
/camera/infra1/image_rect_raw/compressed
/camera/infra1/image_rect_raw/compressed/parameter_descriptions
/camera/infra1/image_rect_raw/compressed/parameter_updates
/camera/infra1/image_rect_raw/compressedDepth
/camera/infra1/image_rect_raw/compressedDepth/parameter_descriptions
/camera/infra1/image_rect_raw/compressedDepth/parameter_updates
/camera/infra1/image_rect_raw/theora
/camera/infra1/image_rect_raw/theora/parameter_descriptions
/camera/infra1/image_rect_raw/theora/parameter_updates
/camera/infra2/camera_info
/camera/infra2/image_rect_raw
/camera/infra2/image_rect_raw/compressed
/camera/infra2/image_rect_raw/compressed/parameter_descriptions
/camera/infra2/image_rect_raw/compressed/parameter_updates
/camera/infra2/image_rect_raw/compressedDepth
/camera/infra2/image_rect_raw/compressedDepth/parameter_descriptions
/camera/infra2/image_rect_raw/compressedDepth/parameter_updates
/camera/infra2/image_rect_raw/theora
/camera/infra2/image_rect_raw/theora/parameter_descriptions
/camera/infra2/image_rect_raw/theora/parameter_updates
/camera/pointcloud/parameter_descriptions
/camera/pointcloud/parameter_updates
/camera/realsense2_camera_manager/bond

There is one depth_registered points:(

@makino-ryota : Alright. let's try a different approach. I believe the frame id for the markers should be changed in skeleton_extract_3d_visualization_node.cpp to be the camera optical frame.

marker.header.frame_id = "/some_optical_frame";

So let's find that frame name.

When everything is running, can you run this command for me?

rostopic echo /tf | grep " frame_id:"

Then post the list of frames here.

We want to represent the markers in the optical frame.

commented

@stevenjj I was running
$ roslaunch realsense2_camera rs_rgbd.launch align_depth:=true enable_pointcloud:=true
$ roslaunch skeleton_extract_3d openpose_skeleton_extract.launch
$ rosrun skeleton_extract_3d skeleton_extract_3d_visualization_node
$ rviz

I run this code, but nothing is appeared...(like in photo)
$ rostopic echo /tf | grep " frame_id:"

rostopic

I do not know if this will help but it is additional information. These are "Fixed Frame" in Rviz when everything is running.

camera_aligned_depth_to _color_frame
camera_aligned_depth_to _infra1_frame
camera_aligned_depth_to _infra2_frame
camera_color_frame
camera_color_optical_frame
camera_depth_frame
camera_depth_optical_frame
camera_infra1_frame
camera_infra1_optical_frame
camera_infra2_frame
camera_infra2_optical_frame
camera_link

Alright, I just wanted to know what frames are available.

So in skeleton_extract_3d_visualization_node change the frame name to

marker.header.frame_id = "camera_depth_optical_frame";

and try running everything again.
If it still looks strange, also try camera_color_optical_frame

commented

@stevenjj
I set
marker.header.frame_id = "camera_depth_optical_frame";
Skeleton worked well in the body!!
result

After that I tried this.
marker.header.frame_id = "camera_color_optical_frame"; made good result too!

And, I have a question
Is opepose_skelteton_extract better to take camera from the side rather than the front?

Thank you for teaching politely!!

@makino-ryota I'm glad you got it working!

Most problems people have with the package are configuration related, but I haven't had the time to fix all of it.

I don't understand the question, but skeleton extraction works best when both the pointcloud and image are synced. So it's best when the camera is directly in front.

commented

@stevenjj That`s what I want you ask.
I see!! Thank you for being kindly taught.