haochihlin / Ardrone_indoor_slam

Including all required files to reproduce lsd-slam based ardrone indoor navigation
https://youtu.be/r9LegSK6MfU
19 stars 5 forks source link

pointcloud not visible in rviz #1

Closed ajayfuloria closed 7 years ago

ajayfuloria commented 7 years ago

Ni Hao Ma !

At the outset I want to thank you for releasing the code for the work that you did. I tried to recompile the stuff and was able to do it without much of a problem. I am facing a small issue though. I want to see the path planning being done, for that I am running the following config,

  1. roslaunch ncku_ardrone ardrone_navigation

  2. roslaunch ar_drone_moveit demo.launch

  3. rosrun ncku_ardrone tum_position_3

  4. rosrun ncku_ardrone conversion

On doing so, I get the pointcloud2 topic and data is being published on that. I see the pointcloud in the lsd_slam window aswell, but on the rviz with moveit plugin which gets initiated, the point cloud is not being updated. In your video however, the pointcloud is being simultaneously being updated in rviz too. Is there a keypress which is required for porting the pointcloud to rviz or am i missing some step, plz do let me know, I will be ever grateful to you.

haochihlin commented 7 years ago

Hi About your question, if the "conversion" node runs well and you could find the related pointcloud topic is publishing data, then you should be able to visualize it in RVIZ. So, could you please check the pointcloud in RVIZ first, if it is OK, then it might be the problem of octomap server (which is the 3D map server you saw in my video).

ajayfuloria commented 7 years ago

hi !

if the "conversion" node runs well

As soon as I run the conversion node, the ar_drone_moveit terminal gives following error: [ERROR] [1492095933.561933979]: Ignoring transform for child_frame_id "shadow" from authority "unknown_publisher" because of a nan value in the transform (0.000000 0.000000 0.000000) (-nan -nan -nan -nan)

you could find the related pointcloud topic is publishing data

The /pointcloud2 topic is publishing data but /pointcloud2_scaled is not publishing even on pressing "p" on the conversion terminal. I saw the code of conversion, you print out the following :+1: ss <<"\ndx:" << dx.transpose() << "\ndq:" << dq.transpose() << " \nx_lsd:" << xlsd.transpose() << "\nx_tum:" << xtum.transpose()<<" \nTime:" << ros::Time::now()

but on my terminal on running conversion there is no output.

octomap server

i have octomap-server and other pkgs for octomap installed.

When I plan a move on motion planning plug-in and follow the path using the "tum_position_3" the planned path is followed. So the only problem is conversion/publishing of pointcloud2_scaled as octomap in rviz.

I would also like to help in taking this code further and giving out version for kinetic ...

Thanks

ajayfuloria commented 7 years ago

Following error is also seen.

[ INFO] [1492146946.962696163]: Listening to '/move_group/monitored_planning_scene' [ WARN] [1492146946.972874483]: No transform available between frame 'lsd_pose' and planning frame '/map' (Could not find a connection between 'map' and 'lsd_pose' because they are not part of the same tree.Tf has two or more unconnected trees.) [ WARN] [1492146946.972948863]: No transform available between frame 'ardrone_base_link' and planning frame '/map' (Could not find a connection between 'map' and 'ardrone_base_link' because they are not part of the same tree.Tf has two or more unconnected trees.) [ WARN] [1492146946.972986648]: No transform available between frame 'odom' and planning frame '/map' (Could not find a connection between 'map' and 'odom' because they are not part of the same tree.Tf has two or more unconnected trees.) [ WARN] [1492146946.973047270]: No transform available between frame 'ardrone_base_frontcam' and planning frame '/map' (Could not find a connection between 'map' and 'ardrone_base_frontcam' because they are not part of the same tree.Tf has two or more unconnected trees.) [ WARN] [1492146946.973087079]: No transform available between frame 'ardrone_base_bottomcam' and planning frame '/map' (Could not find a connection between 'map' and 'ardrone_base_bottomcam' because they are not part of the same tree.Tf has two or more unconnected trees.) [ERROR] [1492146947.148573641]: Group 'altHold' does not have a parent link [ERROR] [1492146947.155115464]: Group 'freeFlight' does not have a parent link

haochihlin commented 7 years ago

Hi

I think the situation is more complicated. As I have mentioned in my youtube comments, I did several modification on "Ardrone_autonomy", "TUM Ardrone" and "LSD-SLAM" pkg. And I don't have an ARDrone to test it now, so I can not directly point out where is the main problem. One possible cause may be there is a lack of some important codes that I forgot to upload them, but it is hard for me to verify it without an ARDrone....

ajayfuloria commented 7 years ago

Hi The changes that you made to lsd slam have been uploaded by you. If you can upload your tum_ardrone and ardrone_autonomy folders too, I can verify as I have an ardrone. I can also help make it, upto date for kinetic.

ajayfuloria commented 7 years ago

I can confirm to you that the tum_position_3 is working fine as the ardrone can be controlled by it. Only problem is coming in conversion.

ajayfuloria commented 7 years ago

Is the tum_ardrone folder in your commit, intentionally blank ?

haochihlin commented 7 years ago

Hi

Yes, I just noted that the package of modified "tum_ardrone" has not been uploaded successfully. I have upload the compressed version of the package, you can try it now.

ajayfuloria commented 7 years ago

Thanks for the upload. One query still remains, how do you port the pointcloud to rviz as octomap? Should it come automatically on starting the conversion?

ajayfuloria commented 7 years ago

Hi! Still I am not able to port the pointcloud to rviz. I am using tum_position_3, there are others aswell, which one r u using for the YouTube demo?

haochihlin commented 7 years ago

Hi if I recall it correctly, I used the following commands in the video:

  1. roslaunch ncku_ardrone ardrone_navigation
  2. roslaunch ar_drone_moveit demo.launch
  3. rosrun ncku_ardrone tum_position_3
  4. rosrun ncku_ardrone conversion

So, the tum_position_3 is just a position controller to control ARDrone. To publish the scaled pointcloud by "ncku_ardrone conversion", you need to check all subscribed topics are available. (you can find the required topic name in source codes)

ajayfuloria commented 7 years ago

Hi Lin! Thanks for the previous responses. I am now able to get the octomap, the conversion is working too. I am facing a problem now that the octomap being published is very sparse. When I echo the topic /pointcloud it also gets data at very sparse intervals. Was this the case with you too ? or did you get dense enough data ?

Also, how to position the drone with respect to the octomap that is created ?

Thanks.

haochihlin commented 7 years ago

Hi, For the sparse pd issue, did you well calibrate your camera before executing the node? In addition, the initialization of lsd slam is quite tricky, you will get good pd output only if handle the initial phase well.

For the final question, I don't understand what you mean. The coordinate of octomap bases on world frame, the pose of drone is also depending on world frame, so I think you can get relative transform directly.

haochihlin commented 7 years ago

Hi I assume this issue has been solved.