Ask Your Question

mz's profile - activity

2018-03-28 10:17:06 -0500 received badge  Student (source)
2016-05-09 22:26:48 -0500 received badge  Famous Question (source)
2016-05-09 22:26:48 -0500 received badge  Notable Question (source)
2015-12-06 00:03:32 -0500 received badge  Popular Question (source)
2015-11-06 00:49:12 -0500 commented question Gazebo teleport robot via set_model_state in 0-gravity only moves part of robot

This combination seems to be working: Set gravity to 0 using the Gazebo WorldPlugin, _world->GetPhysicsEngine()->SetGravity(). Then move the robot model using set_model_state. This seems tricky. Doing both using one method doesn't work, must use this two-method combination.

2015-11-05 17:31:18 -0500 asked a question Gazebo teleport robot via set_model_state in 0-gravity only moves part of robot

Gazebo 2.2.6 with ROS Indigo.

My goal is to teleport a robot hand (without a robot body attached) to arbitrary places in the world, including in mid-air, without the hand falling to the ground. Therefore I need simulation in 0 gravity.

The problem I’m having is, as soon as I set gravity to 0, I can no longer teleport the hand correctly by set_model_state. Part of the hand (all the fingers) moves to the commanded position, and the rest of the hand (the palm) remains in original place.

The condition to produce this:

  1. Set gravity to 0 (rosservice call set_physics_properties). Right after I set gravity to 0, rosservice call get_model_state on the hand shows all 6 twist values being nan.

  2. Now rosservice call set_model_state, then the fingers move to the right place, but the palm doesn’t. So I’d see a hand that’s broken apart, with fingers in one place, palm in original place.

  3. Then any subsequent calls to set_model_state would produce very odd behavior - the fingers move in relative position, rather than absolute, and the palm remains unmoved. e.g. issuing 0.5 0 0 position again and again would move fingers farther and farther from the palm. (Expected behavior is that the fingers move to absolute world coordinates 0.5 0 0, not keep going farther).

Things I've tried:

If I don’t turn off gravity, the full hand would move correctly. Twist values are never nan. Issuing subsequent commands like 0.5 0 0 many times just makes the hand remain at absolute coordinates 0.5 0 0, as expected. The obvious problem is, if I move the hand to mid-air, it falls to the ground. So I need 0 gravity simulation.

If I pause physics during the set_model_state call, the palm and the fingers would appear to have moved together, but once I unpause, it shows they are apart.

This only happens with specific poses, the one that always fails with 0 gravity is position 0.5 0 0, orientation 0 0 0 1. Position 0 0 0.5 moves the whole hand correctly, 1 0 0 too. I need to be able to set the hand to arbitrary poses, so some working and others don’t is not enough.

Resetting simulation (rosservice call /gazebo/reset_simulation) doesn’t make the twist values normal, they remain nan from the moment I turn off gravity.

I also checked my URDF to make sure the joint types are correct. The connection between palm and fingers is revolute, which is needed to move the fingers. The root link, I first had it as a floating type joint, attached to world link. Then I removed the world link and the joint altogether. In either case, the same problem above happens.

It appears to be a problem with gravity being turned off?

Is there anyway to instantly move the hand to arbitrary poses, with the poses specified as 7-tuples (tx ty tz qx qy qz qw ... (more)

2015-06-15 02:53:07 -0500 commented answer Error Using Eigen 'sqrt' While Compiling ROS PCL

Looks like Eigen did remove Eigen::internal::sqrt() and was okay with using std::sqrt() http://eigen.tuxfamily.org/bz/show_bu... and Eigen::internal::sin and cos as well http://listengine.tuxfamily.org/lists...

2015-06-15 01:49:51 -0500 received badge  Scholar (source)
2014-05-14 23:16:36 -0500 received badge  Enthusiast
2013-12-07 20:37:49 -0500 received badge  Famous Question (source)
2013-11-13 17:32:22 -0500 received badge  Famous Question (source)
2013-08-07 15:52:01 -0500 received badge  Notable Question (source)
2013-07-22 11:22:41 -0500 commented question Is object_recognition_ros supposed to work in Fuerte?

I ended up skipping the compilations for those 3 modules. That got OR_ros compiled, but it wasn't very useful, since I still don't have a way to work with bag files. I've been using ORK with a real Kinect and adding rosmsg code myself. It'd still be nice if anyone knows how to get bag files to work.

2013-07-12 13:38:37 -0500 received badge  Popular Question (source)
2013-06-26 14:32:21 -0500 asked a question Is object_recognition_ros supposed to work in Fuerte?

Two questions.

I've been trying for 2 days to get object_recognition_ros to work in Fuerte, and I've come to the conclusion that it's not supposed to work in Fuerte. I need a confirmation. Does it only work in Groovy?

It's specifically for the object_recognition_ros package. I got object_recognition_core to run capture, training, and detection fine, but I need to test detection using bag files, and the BagReader is within object_recognition_ros. In addition, when I run detection using the command for ROS actionlib server according to the instructions on wg-perception.github.io/object_recognition_core/detection/detection.html#detection , they point to the same failure in object_recognition_ros publisher.py - I fixed that, that was 2 days ago, the question is not about this error.

I noticed that object_recognition_ros is not built. Nothing is generated for it in the build/ directory, while things are generated for all other packages, like object_recognition_core, object_recognition_msgs, linemod, tod, etc.

So I wrote a different CMakeLists.txt for object_recognition_ros and wrestled with other cmake things, now cmake generates files for object_recognition_ros, but make gives me errors. I was able to get rid of some of the header file errors by adding include_directory() in the CMakeLists.txt, but a few other header files are non-existent in Fuerte (I found them online only in Groovy documentation):

For info_cache:

object_recognition/src/object_recognition_ros/src/info_cache/info_cache.cpp:170:18: error: ‘createMeshFromBinary’ is not a member of ‘shapes’
For rviz_plugin:
object_recognition/src/object_recognition_ros/src/rviz_plugin/ork_display.cpp:41:44: fatal error: rviz/properties/color_property.h: No such file or directory
**Is there a way to get this to happen in Fuerte - by pulling the Groovy files, or does ORK no longer support Fuerte?** **My second attempt** was to install the binaries with sudo apt-get install ros-fuerte-object-recognition-ros. **One of these two attempts worked partially**, I don't know which one. Now this guy runs:
$ rosrun object_recognition_core detection -c tod_detection_bag.ork --visualize

(where the .ork file is same as the one in tod/conf/detection.ork, with source1 replaced by the BagReader source_1 from here: wg-perception.github.io/object_recognition_core/detection/detection.html#detection )

But it immediately gives me "End of bag.":

[ INFO] [1372288448.168012840]: Initialized ROS. node_name: /object_recognition_server
End of bag.

Given that I still didn't fully generate all (SOME were generated) the files from object_recognition_ros, that might be the problem. So I am really wondering how I can get the cmake stuff above to compile, or get a confirmation that it's not supposed to work in Fuerte; or, everything is normal and "End of bag" is caused by something else?

Second question, detection flag --visualize doesn't bring up any graphics for tod, is this normal? Does tod just not have any visualization, or do I need to install openni-dev from source? (Currently cmake says it can't find openni-dev and visualizations related to openni will be disabled, even though I did install openni from binaries and have it in rospack find.)

Thank you so much!

Update: I ... (more)

2013-06-26 14:04:22 -0500 received badge  Notable Question (source)
2013-05-28 10:08:43 -0500 answered a question GraspIt plugin dbase_grasp_planner computing grasp in database throws error about get_mark_next_dbase_task_of_type

Solution: I wrote my own get_mark_next_dbase_task_of_type(), which worked and added grasps to the database successfully for GRASP_PLANNING and GRASP_CLUSTERING tasks. I did not test it with the other two types (GUIDED_GRASP_PLANNING, VELO_GRASP_PLANNING). It is written based on the get_mark_next_dbase_task() from the 0.5_electric.backup file.

-- Function: get_mark_next_dbase_task_of_type(text[])

-- DROP FUNCTION get_mark_next_dbase_task_of_type(text[]);

CREATE OR REPLACE FUNCTION get_mark_next_dbase_task_of_type(IN dbasetasktype text[])
  RETURNS integer AS
$BODY$
DECLARE next_id INTEGER;
 BEGIN
 SELECT dbase_task_id INTO next_id FROM dbase_task
        WHERE dbase_task_type = ANY ($1)
        LIMIT 1 FOR UPDATE;
 UPDATE dbase_task SET dbase_task_outcome_name = 'RUNNING'
        WHERE dbase_task_id = next_id;
 return next_id;
 END;
$BODY$
  LANGUAGE plpgsql VOLATILE
  COST 100;
ALTER FUNCTION get_mark_next_dbase_task_of_type(text[])
  OWNER TO willow;

Change willow in the last line to whatever your username is.

Another thing I had to do before the grasps would calculate correctly was to rescale our model to be much smaller. Rule of thumb is that both the object and the arm you're using should show up in GraspIt. Manually running GraspIt Eigengrasp Planner to see what's supposed to happen helps ( www.cs.columbia.edu/~cmatei/graspit/html-manual/graspit-manual_12.html#id5 ). The ROS GraspIt plugin uses the Eigengrasp Planner with Search Space Complete and simulated annealing to output the [tx ty tz qw qx qy qz].

2013-05-17 11:23:28 -0500 commented question GraspIt plugin dbase_grasp_planner computing grasp in database throws error about get_mark_next_dbase_task_of_type

We found that in a previous version of the .backup file, the 0.5_electric one, there were functions get_mark_next_dbase_task(), get_mark_next_task(), and save_grasp(), which are not in the 0.6_fuerte.backup file. Still, there is no get_mark_next_dbase_task_of_type() though.

2013-05-14 10:18:48 -0500 commented question GraspIt plugin dbase_grasp_planner computing grasp in database throws error about get_mark_next_dbase_task_of_type

(Thank you SO much for the response, Matei! I was about to email you just now.) Hmm I downloaded the household_objects-0.6_fuerte_prerelease_1.backup, is that not the latest version? Is the SQL function accessible somewhere in a repo that I can just copy-paste it into my function?

2013-05-14 09:40:24 -0500 received badge  Popular Question (source)
2013-05-12 21:38:04 -0500 received badge  Editor (source)
2013-05-12 18:45:00 -0500 asked a question GraspIt plugin dbase_grasp_planner computing grasp in database throws error about get_mark_next_dbase_task_of_type

(My goal: I am trying to add new objects to a local copy of the household_objects_database, and compute grasps for them, so that I can test grasps using tabletop_detection and pr2_pick_and_place for some of our own object models. I have done the former - adding object models, but the latter - computing grasps - is giving me problems.)

What I have done so far: I installed a local copy of household_objects_database in a PostgreSQL localhost database, and I added some of our own object models successfully to the database, using insert_model.cpp from household_objects_database, changing the database connection line from wgs36 to localhost.

What I need: Now I would like to compute the grasps for the new objects I added - because seems like the grasps are not automatically computed when the object models are added to the database (Is that correct? Because in the pgadmin3 GUI, I see our new models in original_model and scaled_model tables, but I don't see any grasps for these new scaled_model_ids in the "grasp" table.)

Where I'm stuck:

To compute grasps using the GraspIt plugin in dbase_grasp_planner, I am running this file with some modifications

$ roslaunch graspit_ros_planning ros_graspit_interface.launch

which I got to run following two other ROS Answers pages. (I also changed the IP to localhost in dbTaskDispatcher.cpp, and recompiled my copies of graspit_dbase_tasks and dbase_grasp_planner to generate new libgraspit_dbase_tasks.so and libdbase_grasp_planner.so files, the latter is needed by the launch file.)

What all that does is that now the launch file starts the GraspIt plugin, connects to the localhost database successfully. However, GraspIt now throws this error:

Processing arguments 
 Function name dbase_grasp_planning
plugin creator autostart 1
[ INFO] [1368320844.809613707]: Function call: get_mark_next_dbase_task_of_type(ARRAY['GRASP_PLANNING','GUIDED_GRASP_PLANNING','VELO_GRASP_PLANNING','GRASP_CLUSTERING'])
[ERROR] [1368320844.922216835]: Database get list: query failed. Error: ERROR:  function get_mark_next_dbase_task_of_type(text[]) does not exist
LINE 1: SELECT get_mark_next_dbase_task_of_type  FROM get_mark_next_...
                                                      ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.

[ERROR] [1368320844.922357154]: Failed to get the id of the next task of given type to be run
[ERROR] [1368320844.922438910]: Function call: get_mark_next_dbase_task_of_type(ARRAY['GRASP_PLANNING','GUIDED_GRASP_PLANNING','VELO_GRASP_PLANNING','GRASP_CLUSTERING'])
Dispatcher: error reading next task
deleting IVmgr
QThreadStorage: Thread 0xaac540 exited after QThreadStorage 7 destroyed

I searched for get_mark_next_dbase_task_of_type many times, and all that comes up is the source code from household_objects_database/database_task.h. Seems like it's looking for a function called get_mark_next_dbase_task_of_type in the database, but the database only has 4 Functions, compute_grasp_robustness, get_grasps, get_models, update_grasps, none of them are that.

I see what it's looking for. Tables dbase_task, dbase_task_type, task_outcome all have relevant stuff. It's trying to get the columns from dbase_task that say TO_RUN, set them to RUNNING, and runs them; when it finishes a task, it sets it to COMPLETED. But I don't know how to give them to it.

So I am reaching a conjecture that I have to create entries in the table that say TO_RUN, create that get_mark_next_dbase_task_of_type() SQL function in the database, and then ... (more)

2012-02-04 12:07:21 -0500 received badge  Supporter (source)