noeperez / indires_navigation

ROS packages for ground robot navigation and exploration
BSD 3-Clause "New" or "Revised" License
121 stars 30 forks source link

how to advertise rrt_plan_ (std::vector<geometry_msgs::PoseStamped>) #12

Closed wzy012 closed 3 years ago

wzy012 commented 3 years ago

Hello, I have a question: In RRT_ros_wrapper.cpp, it has rrtplan,rrtplan is std::vector type,I want to advertise rrtplan data ,Can you help me? Thanks!

noeperez commented 3 years ago

Hello,

you can call the ros service "makeRRTPlan" (here https://github.com/noeperez/indires_navigation/blob/3b1325e3eefa4631709c8821a3b753f997a7be7e/rrt_planners/src/ros/RRT_ros_wrapper.cpp#L1006). It returns the rrt plan as a std::vector. Moreover, it publishes a sphere list to visualize the path in RViz in the topic "/rrt_path_points".

Regards, Noé


Noé Pérez Higueras PostDoc Researcher - Service Robotics Lab (SRL) Pablo de Olavide University, Seville, Spain

El vie, 16 jul 2021 a las 5:59, wzy012 @.***>) escribió:

Hello, I have a question: In RRT_ros_wrapper.cpp, it has rrtplan,rrtplan is std::vector type,I want to advertise rrtplan data ,Can you help me? Thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/noeperez/indires_navigation/issues/12, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADUK36FDJLMJH6YD5XWQM7LTX6VCDANCNFSM5AOZAREQ .

wzy012 commented 3 years ago

Hello,

you can call the ros service "makeRRTPlan" (here https://github.com/noeperez/indires_navigation/blob/3b1325e3eefa4631709c8821a3b753f997a7be7e/rrt_planners/src/ros/RRT_ros_wrapper.cpp#L1006). It returns the rrt plan as a std::vector. Moreover, it publishes a sphere list to visualize the path in RViz in the topic "/rrt_path_points".

Regards, Noé


Noé Pérez Higueras PostDoc Researcher - Service Robotics Lab (SRL) Pablo de Olavide University, Seville, Spain

El vie, 16 jul 2021 a las 5:59, wzy012 @.***>) escribió:

Hello, I have a question: In RRT_ros_wrapper.cpp, it has rrtplan,rrtplan is std::vector type,I want to advertise rrtplan data ,Can you help me? Thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/noeperez/indires_navigation/issues/12, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADUK36FDJLMJH6YD5XWQM7LTX6VCDANCNFSM5AOZAREQ .

yeah,I noticed this.I try to subscribe topic "rrt_path_points",it's type is visualization_msgs::Marker.I have generated the path,when I subscribe it,only return to position.x=0,position.y=0.I don't know reasons.

noeperez commented 3 years ago

Hello again,

if the path is empty, the problem is not in rrt_ros_wrapper. The setup of the system is complex. According to the density and size of the input pointcloud, several parameters must be adjusted. The system won't be able to plan a path until everything is properly fixed based on the features of the input pointcloud. Which mapping system are you using? And a stupid detail, the robot must be "inside" the pointcloud map. The robot needs to be on "something". It needs a good density of points from below it to the goal to plan a path. That's why a mapping/slam system (based on pointclouds) is necessary, and the pointcloud of a RGBD camera can not be employed directly.

El vie, 16 jul 2021 a las 9:38, wzy012 @.***>) escribió:

Hello,

you can call the ros service "makeRRTPlan" (here

https://github.com/noeperez/indires_navigation/blob/3b1325e3eefa4631709c8821a3b753f997a7be7e/rrt_planners/src/ros/RRT_ros_wrapper.cpp#L1006 ). It returns the rrt plan as a std::vector. Moreover, it publishes a sphere list to visualize the path in RViz in the topic "/rrt_path_points".

Regards, Noé

Noé Pérez Higueras PostDoc Researcher - Service Robotics Lab (SRL) Pablo de Olavide University, Seville, Spain

El vie, 16 jul 2021 a las 5:59, wzy012 @.***>) escribió:

Hello, I have a question: In RRT_ros_wrapper.cpp, it has rrtplan,rrtplan is std::vector type,I want to advertise rrtplan data ,Can you help me? Thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub

12 https://github.com/noeperez/indires_navigation/issues/12, or

unsubscribe

https://github.com/notifications/unsubscribe-auth/ADUK36FDJLMJH6YD5XWQM7LTX6VCDANCNFSM5AOZAREQ .

yeah,I noticed this.I try to subscribe topic "rrt_path_points",it's type is visualization_msgs::Marker.I have generated the path,when I subscribe it,only return to position.x=0,position.y=0.I don't know reasons.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/noeperez/indires_navigation/issues/12#issuecomment-881243111, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADUK36CQJ2LWYHHGAL5XLY3TX7OX5ANCNFSM5AOZAREQ .

wzy012 commented 3 years ago

Hello again, if the path is empty, the problem is not in rrt_ros_wrapper. The setup of the system is complex. According to the density and size of the input pointcloud, several parameters must be adjusted. The system won't be able to plan a path until everything is properly fixed based on the features of the input pointcloud. Which mapping system are you using? And a stupid detail, the robot must be "inside" the pointcloud map. The robot needs to be on "something". It needs a good density of points from below it to the goal to plan a path. That's why a mapping/slam system (based on pointclouds) is necessary, and the pointcloud of a RGBD camera can not be employed directly. El vie, 16 jul 2021 a las 9:38, wzy012 @.>) escribió: Hello, you can call the ros service "makeRRTPlan" (here https://github.com/noeperez/indires_navigation/blob/3b1325e3eefa4631709c8821a3b753f997a7be7e/rrt_planners/src/ros/RRT_ros_wrapper.cpp#L1006 ). It returns the rrt plan as a std::vector. Moreover, it publishes a sphere list to visualize the path in RViz in the topic "/rrt_path_points". Regards, Noé ------------------------------ Noé Pérez Higueras PostDoc Researcher - Service Robotics Lab (SRL) Pablo de Olavide University, Seville, Spain El vie, 16 jul 2021 a las 5:59, wzy012 @.>) escribió: Hello, I have a question: In RRT_ros_wrapper.cpp, it has rrtplan,rrtplan is std::vector type,I want to advertise rrtplan data ,Can you help me? Thanks! — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub #12 <#12>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADUK36FDJLMJH6YD5XWQM7LTX6VCDANCNFSM5AOZAREQ . yeah,I noticed this.I try to subscribe topic "rrt_path_points",it's type is visualization_msgs::Marker.I have generated the path,when I subscribe it,only return to position.x=0,position.y=0.I don't know reasons. — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#12 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADUK36CQJ2LWYHHGAL5XLY3TX7OX5ANCNFSM5AOZAREQ .

Thank you. I use your package(upo_robot_navigation) ,this package you published 4 years ago.I think I should comment on upo_robot_navigation issue. In rviz, it has path,it topic is "rrt_path_points",I subscribe it,but position x,y =0. Here is my subscribe coding: void chatterCallback(const visualization_msgs::Marker::ConstPtr& msg) { //将接收到的消息打印出来 //ROS_INFO("path x:[%f], path y:[%f}",msg->pose.position.x, msg->pose.position.y); //ROS_INFO("frame_id: %c", msg->header.frame_id); std::cout<header.frame_id<<std::endl; std::cout<pose.position.x<<" "<pose.position.y<<std::endl; //ROS_INFO("path x:[%f], path y:[%f]",msg->pose.position.x,msg->pose.position.y);

} int main(int argc, char **argv) { //初始化ros节点 ros::init(argc, argv, "subpath");

//创建节点句柄
ros::NodeHandle n;

//创建一个Subscriber,订阅名为 **** 的话题,注册回调函数
ros::Subscriber sub = n.subscribe("rrt_path_points", 1000, chatterCallback);

//循环等待回调函数
ros::spin();

return 0;

} I hope you can get me help.

noeperez commented 3 years ago

Hello,

upo robot_navigation is not a mapping/slam system. It is a different metapackage than indires_navigation. They have different objectives. Besides, it is a very old package that is not longer supported. Anyway, in both navigation systems, an external mapping/slam system is required. In case of upo_robot_navigation, the regular costmaps of ROS can be employed. On the other hand, indires_navigation requires an 3D mapping/slam system providing the 3D map in form of a pointcloud.

El vie, 16 jul 2021 a las 10:09, wzy012 @.***>) escribió:

Hello again, if the path is empty, the problem is not in rrt_ros_wrapper. The setup of the system is complex. According to the density and size of the input pointcloud, several parameters must be adjusted. The system won't be able to plan a path until everything is properly fixed based on the features of the input pointcloud. Which mapping system are you using? And a stupid detail, the robot must be "inside" the pointcloud map. The robot needs to be on "something". It needs a good density of points from below it to the goal to plan a path. That's why a mapping/slam system (based on pointclouds) is necessary, and the pointcloud of a RGBD camera can not be employed directly. El vie, 16 jul 2021 a las 9:38, wzy012 @.

>) escribió: … <#m-740732645631052867> Hello, you can call the ros service "makeRRTPlan" (here https://github.com/noeperez/indires_navigation/blob/3b1325e3eefa4631709c8821a3b753f997a7be7e/rrt_planners/src/ros/RRT_ros_wrapper.cpp#L1006 https://github.com/noeperez/indires_navigation/blob/3b1325e3eefa4631709c8821a3b753f997a7be7e/rrt_planners/src/ros/RRT_ros_wrapper.cpp#L1006 ). It returns the rrt plan as a std::vector. Moreover, it publishes a sphere list to visualize the path in RViz in the topic "/rrt_path_points". Regards, Noé ------------------------------ Noé Pérez Higueras PostDoc Researcher - Service Robotics Lab (SRL) Pablo de Olavide University, Seville, Spain El vie, 16 jul 2021 a las 5:59, wzy012 @.>) escribió: Hello, I have a question: In RRT_ros_wrapper.cpp, it has rrtplan,rrtplan is std::vector type,I want to advertise rrtplan data ,Can you help me? Thanks! — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub #12 https://github.com/noeperez/indires_navigation/issues/12 <#12 https://github.com/noeperez/indires_navigation/issues/12>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADUK36FDJLMJH6YD5XWQM7LTX6VCDANCNFSM5AOZAREQ . yeah,I noticed this.I try to subscribe topic "rrt_path_points",it's type is visualization_msgs::Marker.I have generated the path,when I subscribe it,only return to position.x=0,position.y=0.I don't know reasons. — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#12 (comment) https://github.com/noeperez/indires_navigation/issues/12#issuecomment-881243111>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADUK36CQJ2LWYHHGAL5XLY3TX7OX5ANCNFSM5AOZAREQ .

Thank you. I use your package(upo_robot_navigation) ,this package you published 4 years ago.I think I should comment on upo_robot_navigation issue. In rviz, it has path,it topic is "rrt_path_points",I subscribe it,but position x,y =0. Here is my subscribe coding: void chatterCallback(const visualization_msgs::Marker::ConstPtr& msg) { //将接收到的消息打印出来 //ROS_INFO("path x:[%f], path y:[%f}",msg->pose.position.x, msg->pose.position.y); //ROS_INFO("frame_id: %c", msg->header.frame_id); std::cout<header.frame_id<<std::endl; std::cout<pose.position.x<<" "<pose.position.y<<std::endl; //ROS_INFO("path x:[%f], path y:[%f]",msg->pose.position.x,msg->pose.position.y);

} int main(int argc, char **argv) { //初始化ros节点 ros::init(argc, argv, "subpath");

//创建节点句柄

ros::NodeHandle n;

//创建一个Subscriber,订阅名为 **** 的话题,注册回调函数

ros::Subscriber sub = n.subscribe("rrt_path_points", 1000, chatterCallback);

//循环等待回调函数

ros::spin();

return 0;

} I hope you can get me help.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/noeperez/indires_navigation/issues/12#issuecomment-881261219, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADUK36F42MCDTFCI7CK5IETTX7SMBANCNFSM5AOZAREQ .

wzy012 commented 3 years ago

Hello again,

if the path is empty, the problem is not in rrt_ros_wrapper. The setup of the system is complex. According to the density and size of the input pointcloud, several parameters must be adjusted. The system won't be able to plan a path until everything is properly fixed based on the features of the input pointcloud. Which mapping system are you using? And a stupid detail, the robot must be "inside" the pointcloud map. The robot needs to be on "something". It needs a good density of points from below it to the goal to plan a path. That's why a mapping/slam system (based on pointclouds) is necessary, and the pointcloud of a RGBD camera can not be employed directly.

El vie, 16 jul 2021 a las 9:38, wzy012 @.***>) escribió:

Hello,

you can call the ros service "makeRRTPlan" (here

https://github.com/noeperez/indires_navigation/blob/3b1325e3eefa4631709c8821a3b753f997a7be7e/rrt_planners/src/ros/RRT_ros_wrapper.cpp#L1006 ). It returns the rrt plan as a std::vector. Moreover, it publishes a sphere list to visualize the path in RViz in the topic "/rrt_path_points".

Regards, Noé

Noé Pérez Higueras PostDoc Researcher - Service Robotics Lab (SRL) Pablo de Olavide University, Seville, Spain

El vie, 16 jul 2021 a las 5:59, wzy012 @.***>) escribió:

Hello, I have a question: In RRT_ros_wrapper.cpp, it has rrtplan,rrtplan is std::vector type,I want to advertise rrtplan data ,Can you help me? Thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub

12 https://github.com/noeperez/indires_navigation/issues/12, or

unsubscribe

https://github.com/notifications/unsubscribe-auth/ADUK36FDJLMJH6YD5XWQM7LTX6VCDANCNFSM5AOZAREQ .

yeah,I noticed this.I try to subscribe topic "rrt_path_points",it's type is visualization_msgs::Marker.I have generated the path,when I subscribe it,only return to position.x=0,position.y=0.I don't know reasons.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/noeperez/indires_navigation/issues/12#issuecomment-881243111, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADUK36CQJ2LWYHHGAL5XLY3TX7OX5ANCNFSM5AOZAREQ .

Thanks! I will look again.