Hello,<div><br></div><div>Could you please re-post this question on <a href="http://answers.ros.org">answers.ros.org</a>? Its a more accessible/easily searchable medium than this mailing list and others will more easily benefit from the answer to your question.</div>
<div><br></div><div>Hope all is well,</div><div><br></div><div>Eitan<br><div><br><div class="gmail_quote">On Thu, Jun 9, 2011 at 12:25 AM, GANESH KUMAR <span dir="ltr"><<a href="mailto:pkganeshpk@gmail.com">pkganeshpk@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hello,<br>
<br>
I'm unable to get simple carrot planner code , for motion planning, up<br>
and running.<br>
The problem I'm trying to write code for is: to use carrot planner to<br>
move the  erratic gazebo robot from a start point to end point.<br>
Here are the problems I am facing:<br>
(1) I doubt if my design is correct, or if there's a simpler way to<br>
solve the above problem. Currently, I start erratic_wg.launch within<br>
simulator_gazebo. Next, I have a tf::listener instance running in a<br>
separate program, excerpts from which are given below. The listener<br>
uses the carrot planner while transforming from base_link to map:<br>
===<br>
void transformPoint(const tf::TransformListener& listener)<br>
{<br>
         geometry_msgs::PointStamped laser_point;<br>
         laser_point.header.frame_id = "base_link";<br>
              ...<br>
            tf::TransformListener mytf(ros::Duration(10));<br>
<br>
         costmap_2d::Costmap2DROS costmap("my_costmap", mytf);<br>
         carrot_planner::CarrotPlanner cp  ;<br>
         cp.initialize("my_carrot_planner", &costmap);<br>
         try<br>
         {<br>
                 geometry_msgs::PointStamped base_point;<br>
                 listener.transformPoint("map", laser_point, base_point);<br>
<br>
                 geometry_msgs::PoseStamped start  ;<br>
                start.pose.position.x = 0 , start.pose.position.y = 0,<br>
start.pose.position.z = 0;<br>
                geometry_msgs::PoseStamped end;<br>
                end.pose.position.x = 5 , end.pose.position.y = 5,<br>
end.pose.position.z = 0;<br>
<br>
                std::vector<geometry_msgs::PoseStamped> plan;<br>
                cp.makePlan(start, end, plan);<br>
                // SHould I send a cmd_vel message now for each step<br>
of the plan?<br>
        }<br>
}<br>
===<br>
<br>
(2) When my costmap is initialized as above, the listener code<br>
segfaults. I have traced this to the constructor of Costmap2DPublisher<br>
called within Costmap2DROS constructor, but haven't gone deeper than<br>
this.  I am using ros version  1.2.4 and the older version of the<br>
navigation stack (i.e. which contained nav_view). I am not sure how to<br>
specify the navigation stack version more precisely (i.e. repo<br>
revision, etc.). Also, the latest navigation stack doesn't build , as<br>
pcl_ros doesn't compile on my ros. So I stuck with a previous version<br>
I had downloaded around Nov. 2010. I can provide further details if<br>
necessary.<br>
<br>
Thanks<br>
PKG<br>
_______________________________________________<br>
ros-users mailing list<br>
<a href="mailto:ros-users@code.ros.org">ros-users@code.ros.org</a><br>
<a href="https://code.ros.org/mailman/listinfo/ros-users" target="_blank">https://code.ros.org/mailman/listinfo/ros-users</a><br>
</blockquote></div><br></div></div>