ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

jwatson_utah_edu's profile - activity

2021-02-08 11:59:08 -0500 received badge  Enlightened (source)
2021-02-08 11:59:08 -0500 received badge  Good Answer (source)
2020-06-02 19:38:32 -0500 received badge  Nice Answer (source)
2019-10-07 22:05:20 -0500 received badge  Famous Question (source)
2019-05-15 15:51:12 -0500 received badge  Famous Question (source)
2018-05-22 10:30:02 -0500 received badge  Famous Question (source)
2018-05-18 08:49:51 -0500 received badge  Famous Question (source)
2018-05-18 08:49:51 -0500 received badge  Notable Question (source)
2018-03-11 14:20:36 -0500 received badge  Notable Question (source)
2018-01-08 16:58:51 -0500 received badge  Popular Question (source)
2017-09-15 05:48:55 -0500 received badge  Notable Question (source)
2017-09-15 05:48:55 -0500 received badge  Popular Question (source)
2017-08-17 23:06:17 -0500 asked a question Error linking libccd

Error linking libccd I have a problem compiling a project that uses FCL and libccd, both of which are compiled from sour

2017-08-17 22:56:43 -0500 received badge  Supporter (source)
2017-08-17 22:56:03 -0500 received badge  Famous Question (source)
2017-06-20 09:56:32 -0500 received badge  Notable Question (source)
2017-06-20 09:56:32 -0500 received badge  Popular Question (source)
2017-05-19 08:23:10 -0500 received badge  Famous Question (source)
2017-05-19 08:23:10 -0500 received badge  Popular Question (source)
2017-05-19 08:23:10 -0500 received badge  Notable Question (source)
2017-04-05 17:03:32 -0500 asked a question C++ , FCL: Compilations Issues with Simple Collision Geometry

I am using Ubuntu 14.04 / Indigo and the latest FCL clone from the repo

With the following includes:

#include <fcl/shape/geometric_shapes.h>
#include <fcl/shape/geometric_shapes_utility.h>
#include <fcl/narrowphase/narrowphase.h>
#include <fcl/collision.h>
#include <iostream>

I am trying to create a simple Box:

Box box0(  ); // Parens shouldn't be the correct way to invoke this in C++

Throws no error, but when I

Vec3f boxDims{ 1,1,1 };
Box box0{ boxDims };

or

Box box0{  }; // I would expect the constructor to be invoked with curly braces in C++?

The following errors happen:

CMakeFiles/marker_move.dir/src/mrkr_move.cpp.o: In function `fcl::CollisionGeometry::CollisionGeometry()':
mrkr_move.cpp:(.text._ZN3fcl17CollisionGeometryC2Ev[_ZN3fcl17CollisionGeometryC5Ev]+0x33): undefined reference to `fcl::AABB::AABB()'
CMakeFiles/marker_move.dir/src/mrkr_move.cpp.o: In function `fcl::Box::Box(fcl::Vec3fX<fcl::details::Vec3Data<double> > const&)':
mrkr_move.cpp:(.text._ZN3fcl3BoxC2ERKNS_6Vec3fXINS_7details8Vec3DataIdEEEE[_ZN3fcl3BoxC5ERKNS_6Vec3fXINS_7details8Vec3DataIdEEEE]+0x23): undefined reference to `vtable for fcl::Box'
CMakeFiles/marker_move.dir/src/mrkr_move.cpp.o: In function `fcl::Box::~Box()':
mrkr_move.cpp:(.text._ZN3fcl3BoxD2Ev[_ZN3fcl3BoxD5Ev]+0x13): undefined reference to `vtable for fcl::Box'

Which seems to refer to the Box constructor. Do you know what is causing this? The same errors occur when I try to invoke the constructor with three floats as the signature.

I have added /usr/include/fcl to the include_directories command within CMakeLists.txt, but this does not change the error. I originally built FCL with cmake / make, and used sudo make install as usual. Also, I cannot find_package(FCL REQUIRED) because I am building with catkin/ROS, and FCL is not a ROS package.

Anyone else have these troubles with C++ / FCL / Ubuntu / Indigo?

Thanks in advance!

2017-03-19 17:25:15 -0500 received badge  Famous Question (source)
2017-03-19 17:25:15 -0500 received badge  Notable Question (source)
2017-02-14 05:28:57 -0500 received badge  Notable Question (source)
2017-02-14 05:28:57 -0500 received badge  Popular Question (source)
2017-02-13 15:49:52 -0500 received badge  Student (source)
2017-01-03 05:05:16 -0500 received badge  Popular Question (source)
2016-08-25 01:44:52 -0500 received badge  Necromancer (source)
2016-08-24 18:12:30 -0500 answered a question failed to resolve RegisterPlugin libdiff_drive_controller.so:undefined symbol

Make sure to

 #include <gazebo/common/Plugin.hh>

at the beginning of the plugin source, and register the plugin with Gazebo with

GZ_REGISTER_WORLD_PLUGIN( YourWorldPluginClass ) //Different function for each type of Gazebo plugin

These solved the issue for a plugin I was writing.

I realize this is an old question, but this was the first search hit I got when trying to solve a similar problem.

2016-08-17 21:53:47 -0500 asked a question gazebo::physics::get_world crashes node

ROS Indigo on Ubuntu 14.04 with Gazebo 7

I am trying to access the models in a Gazebo world via a node. In order to do this, I am just trying to get a reference to the world. Using the get_world function in the gazebo::physics namespace causes the node process to die. I try to catch the offending error below, but information from the error is not printed. The node just dies. The usage of this function in the docs seems straightforward. Why does this crash?

// ROS
#include <ros/ros.h>
#include <ros/package.h>
#include <std_msgs/Header.h>
#include <std_msgs/String.h>
#include <std_msgs/Char.h>
// Gazebo
#include <boost/bind.hpp>
#include <gazebo/gazebo.hh>
#include <gazebo/physics/physics.hh>
#include <gazebo/common/common.hh>
#include <stdio.h>
//#include "gazebo/GetWorldProperties.h" // DO I NEED THIS? , Error if included 

int main(int argc, char** argv){ // Accept args from the console

    ros::init(argc, argv, "attacher_node"); 

    ros::NodeHandle nh("attacher_handle"); // Start the node and give it a name

    ros::Publisher rNotifyPub = nh.advertise<std_msgs::String>( "/regrasp/notify" , 100 ); 

    std_msgs::String outMsg;

    try {
        // Get a reference to the world  
        gazebo::physics::WorldPtr worldRef = gazebo::physics::get_world("default"); 
    } catch (const std::exception& e) { // The error is never caught, process dies
        outMsg.data = e.what(); 
        rNotifyPub.publish(outMsg);
    }

    return 0; // Return OK
}

The following error information is printed when I run the launch file that calls the node:

[attacher_node-10] process has died [pid 28515, exit code -6, cmd /home/jwatson/regrasp_planning/devel/lib/grasp_anything/attacher_node __name:=attacher_node __log:=/home/jwatson/.ros/log/0e0eaf34-64e5-11e6-8d9b-0022191c2335/attacher_node-10.log].
log file: /home/jwatson/.ros/log/0e0eaf34-64e5-11e6-8d9b-0022191c2335/attacher_node-10*.log

The log file mentioned in the error message does not exist. When I try to open it in gedit it just creates the file.

2016-08-07 13:59:29 -0500 asked a question How to programmatically attach link to a model during simulation?

Indigo on Ubuntu 14.04 with Gazebo 7.3 and Python 2.7

I have non-colliding URDF models to be used as markers in Gazebo. The markers will be attached to objects to be grasped, and their positions relative to those objects will change as planning executes. I have not found a tutorial or example of programmatically attaching a URDF model to either a world object or robot link as a link that moves with the target object. Can this be done with rospy?

I'd like to implement this in Gazebo rather than RViz because the equipment I have been provided with struggles with Gazebo on its own.

2016-08-05 18:43:16 -0500 received badge  Popular Question (source)
2016-08-05 18:41:25 -0500 asked a question Deleting Gazebo model causes Python to freeze

Indigo on Ubuntu 14.04 with Gazebo 7.3 and Python 2.7

Whenever I call the Gazebo model deletion service, Python freezes. No errors or special messages appear when the deletion code runs. This happens whether I wait for the service to become available or not. I checked that the model name is correct.

from gazebo_msgs.srv import DeleteModel # For deleting models from the environment

def del_model( modelName ): # FIXME: Freezes Python, DO NOT USE!
    """ Remove the model with 'modelName' from the Gazebo scene """
    # delete_model : gazebo_msgs/DeleteModel
    del_model_prox = rospy.ServiceProxy('gazebo/delete_model', DeleteModel) # Handle to model spawner
    # rospy.wait_for_service('gazebo/delete_model') # Wait for the model loader to be ready 
    # FREEZES EITHER WAY
    del_model_prox(modelName) # Remove from Gazebo

There is no feedback from ROS / Gazebo as to what is happening. Why does this happen?

2016-07-30 18:13:25 -0500 received badge  Editor (source)
2016-07-30 16:11:25 -0500 commented question Gazebo object spawned in robot link frame does not move with robot link

My present goal is to attach and detach a physics object to and from a particular robot link. I need something even "cheaper" than the gazebo_grasp_plugin, as I wish to avoid all contact modeling, and gazebo_grasp_plugin, does not allow joints in between palm and gripper tips.

2016-07-30 16:04:38 -0500 asked a question Gazebo object spawned in robot link frame does not move with robot link

ROS Indigo on Ubuntu 14.04 with Gazebo 7.3 and Python 2.7

I use a Gazebo service to spawn a fixed object in a link reference frame, but the object remains fixed with respect to the world instead of with respect to the frame. Why is this so? Here is the rospy code:

def test_robot_attachment():
    """ Try attaching an axes model to a robot frame and see what happens """
    global attachCounter
    spawn_model_prox = rospy.ServiceProxy('gazebo/spawn_sdf_model', SpawnModel) # Get a handle to the Gazebo model spawner
    modelPath = rospack.get_path('grasp_anything') + '/urdf/block_axes.urdf' # Build a path to the model URDF
    f = open(modelPath,'r') # Open the URDF for reading
    sdff = f.read() # and read it
    rospy.wait_for_service('gazebo/spawn_sdf_model') # Wait for the model loader to be ready
    targetPose = ROS_geo_pose_from_lists( [ 0.5 , 0.5 , 0.5 ] , [0,0,0,1] )
    spawn_model_prox("axesAttached" + str(attachCounter), sdff, "robotos_name_space", targetPose, "lbr4_allegro::lbr4_7_link") # gen model name and place the axes at the specfied pose
    attachCounter += 1

Is there a way to attach a model to a moving frame such that it moves with the frame but is static within the frame itself? As you can see below, the URDF being inserted has no collision geometry, the model is set to static, and gravity is turned off for the model.

Here is "block_axes.urdf":

<?xml version="1.0"?>
<!-- URL, Spawning simple geometry in Gazebo: http://wiki.ros.org/simulator_gazebo/Tutorials/SpawningObjectInSimulation -->
<robot name="block_axes"> <!-- Every URDF model you add is a "robot" -->
    <link name="x_axis">
        <!-- URL, Inertia element must be present: http://gazebosim.org/tutorials?tut=ros_urdf#%3Cinertial%3EElement -->
        <inertial>
            <origin xyz="2 0 0" />
            <mass value="1.0" />
            <inertia  ixx="1.0" ixy="0.0"  ixz="0.0"  iyy="100.0"  iyz="0.0"  izz="1.0" />
        </inertial>
        <visual>
            <!--origin xyz="2 0 1"/-->  <!-- Is this absolute or relative? -->
            <origin xyz="0.05 0 0"/>
            <geometry>
                <box size="0.1 0.01 0.01" />
            </geometry>
        </visual>
    </link>
    <joint name="X-Y" type="continuous">
        <parent link="x_axis"/>
        <child  link="y_axis"/>
    </joint>
    <link name="y_axis">
        <!-- URL, Inertia element must be present: http://gazebosim.org/tutorials?tut=ros_urdf#%3Cinertial%3EElement -->
        <inertial>
            <origin xyz="2 0 0" />
            <mass value="1.0" />
            <inertia  ixx="1.0" ixy="0.0"  ixz="0.0"  iyy="100.0"  iyz="0.0"  izz="1.0" />
        </inertial>
        <visual>
            <!--origin xyz="2 0 1"/-->  <!-- Is this absolute or relative? -->
            <origin xyz="0 0.05 0"/>
            <geometry>
                <box size="0.01 0.1 0.01" />
            </geometry>
        </visual>
    </link>
    <joint name="X-Z" type="continuous">
        <parent link="x_axis"/>
        <child  link="z_axis"/>
    </joint>
    <link name="z_axis">
        <!-- URL, Inertia element must be present: http://gazebosim.org/tutorials?tut=ros_urdf#%3Cinertial%3EElement -->
        <inertial>
            <origin xyz="2 0 0" />
            <mass value="1.0" />
            <inertia  ixx="1.0" ixy="0.0"  ixz="0.0"  iyy="100.0"  iyz="0.0"  izz="1.0" />
        </inertial>
        <visual>
            <!--origin xyz="2 0 1"/-->  <!-- Is this absolute or relative? -->
            <origin xyz="0 0 0.05"/>
            <geometry>
                <box size="0.01 0.01 0.1" />
            </geometry>
        </visual>
    </link>
    <gazebo reference ...
(more)
2016-07-30 12:40:44 -0500 received badge  Enthusiast
2016-07-27 12:52:03 -0500 marked best answer Waiting for "gazebo_msgs/GetLinkState" causes Python to freeze

ROS Indigo on Ubuntu 14.04 with Gazebo 7.3.0 and Python 2.7:

I have an issue withs starting a Gazebo service proxy for getting link states programmatically from a Python file I run after running the launch file that starts the Gazebo world. At the top of the file I have:

from gazebo_msgs.srv import GetLinkState 
from gazebo_msgs.msg import LinkState # For getting information about link states

...

Later in the file I have:

# Get model information from Gazebo
# Get a handle to the Gazebo model spawner
model_info_prox = rospy.ServiceProxy('gazebo_msgs/GetLinkState', GetLinkState) # No error here
rospy.wait_for_service('gazebo_msgs/GetLinkState') # <-- Python hangs here without error
print model_info_prox( "lbr4_allegro" , "lbr4_7_link" ) # Never makes it here

The script freezes waiting for link states to become available, as noted above. Why does this happen? I used a similar pattern for spawning models and it works fine.

2016-07-27 12:52:03 -0500 received badge  Scholar (source)
2016-07-27 01:27:48 -0500 received badge  Self-Learner (source)
2016-07-27 01:27:48 -0500 received badge  Teacher (source)