<div><span class="Apple-style-span" style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">Hey Gil, <br><br>Thanks so much. I tried what you suggested and here's the code I have: <br>
<br>arm_navigation_msgs::Shape trimesh_object; <br>trimesh_object.type = arm_navigation_msgs::Shape::MESH; <br>btVector3 scale(1.0,1.0,1.0); <br>shapes::Mesh *mesh = shapes::createMeshFromFilename("package://.../ship.stl", &scale); <br>
if(!planning_environment::constructObjectMsg(mesh, trimesh_object)) { <br>  ROS_WARN_STREAM("Object construction fails"); <br>} <br>geometry_msgs::Pose pose; <br>collision_object.shapes.push_back(trimesh_object); <br>
collision_object.poses.push_back(pose); <br><br>Now the meshes are computed into convex hulls without errors, but the problem is: at rviz, Planning Scene /planning_scene_markers topic's pole/0 displays error: <br><br>
"Contains invalid floating point values (nans or infs)" <br><br>So maybe the convex hulls or something else are still not computed correctly. I tried different mesh files and got the same error. Maybe it's the Post object's problem? Otherwise it's really hard to figure out why this is happening. I also added this question into <a href="http://answers.ros.org/question/30401/rviz-mesh-nans-infs-planning-scene" target="_top" rel="nofollow" link="external" style="font-size:1em;color:rgb(0,0,238)">here</a> but sadly no one has a clue yet. <br>
<br>Thanks in advance. <br><br>-Paul</span><br><br><div class="gmail_quote">On Sat, Mar 10, 2012 at 9:25 PM, Arkapravo Bhaumik <span dir="ltr"><<a href="mailto:arkapravobhaumik@gmail.com">arkapravobhaumik@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Consider putting this question to <a href="http://answers.ros.org" target="_blank">answer.ros</a>, chances are that you may get better replies.<div class="HOEnZb">
<div class="h5"><br><br><div class="gmail_quote">On 11 March 2012 03:11, Paul Heran Yang <span dir="ltr"><<a href="mailto:heranyang@gmail.com" target="_blank">heranyang@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote">Hi all,<div><br></div><div>I've been trying to add meshes into collision object, but always get error: "Unable to compute convex hull"</div>


<div><br></div><div><div>    trimesh_object.type = arm_navigation_msgs::Shape::MESH;</div>

<div>    for (int i = 0; i < 3; i++) {</div><div>        geometry_msgs::Point p;</div><div>        p.x = i;</div><div>        p.y = i+1;</div><div>        p.z = i+2;</div><div>        trimesh_object.vertices.push_back(p);</div>




</div><div>    }</div><div><br></div><div>    // then add {0, 1, 2} into trimesh_object.triangles</div>    collision_object.shapes.push_back(trimesh_object);<div><div><br></div><div>    geometry_msgs::Pose pose;</div></div>




<div><div>    collision_object.poses.push_back(pose);</div></div><div><br></div><div>    ...</div><div><div><br></div><div>    planning_scene_req.planning_scene_diff.collision_objects.push_back(collision_object);</div></div>




<div>    get_planning_scene_client.call(planning_scene_req, planning_scene_res) ...</div><div><br></div><div>I've followed the instructions on <a href="http://www.ros.org/wiki/arm_navigation/Tutorials/Planning%20Scene/Adding%20Virtual%20Objects%20to%20the%20Planning%20Scene" target="_blank">http://www.ros.org/wiki/arm_navigation/Tutorials/Planning%20Scene/Adding%20Virtual%20Objects%20to%20the%20Planning%20Scene</a></div>




<div><br></div><div>All I'm trying to do is just to add a simple triangle into the scene, but so far no luck. The above code just adds {0,1,2},{1,2,3},{2,3,4} into it. I also tried {0,0,1},{0,1,0},{1,0,0}. Nothing works.</div>




<div><br></div><div>I don't get why there's "unable to compute convex hull" error. Thanks in advance.</div><span><font color="#888888"><span><font color="#888888"><div><br></div><div>-Paul</div>

<div><br></div></font></span></font></span></div>


</blockquote></div>
</div></div><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>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Paul (Heran) Yang</div><div style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<a href="http://heranyang.com/" style="color:rgb(17,85,204)" target="_blank">http://heranyang.com</a></div><div style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<a href="http://heray.tumblr.com" target="_blank">http://heray.tumblr.com</a></div><div style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Cornell University</div>
<div style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Computer Science, B.S. 2012</div></div><br>
</div>