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

aknirala's profile - activity

2020-06-27 15:21:16 -0500 received badge  Nice Question (source)
2019-01-10 11:07:08 -0500 received badge  Good Question (source)
2018-09-14 17:25:52 -0500 marked best answer Anyone using Asus K55VM-SX086D Laptop for running ROS

Hello community

I saw few threads regarding laptop recommendation, please forgive me for adding one more.

I am planning to buy Asus K55VM-SX086D Laptop (http://www.flipkart.com/asus-k55vm-sx086d-laptop-3rd-gen-ci7-8gb-1tb-dos-2gb-graph/p/itmd7vs3cgw4twkr)

I am going for a laptop coz I will be moving a lot (so desktop is not an option). Mostly I will be doing my work on a simulated home environment with PR2 robot.

Running object manipulation stack (and also navigation).

Kindly let me know:-

  1. If someone is using this or similar config (i7 3610QM, 2.3 GHz with Turbo Boost Upto 3.3 GHz, 6MB Cache, NVIDIA GeForce GT 630M 2GB, 8GB RAM), how much simulation speed can I expect when I will be running:-
    • PR2 in simulated home (say 10 table chair and 20 household graspable object)
    • While object manipulation stack will be called.
    • With navigation stack.
  2. I would like to have a speed of at least 0.15x when running those stacks. With my experience on i3 desktop I guess I should get this much on this machine. However if not then any better laptop suggestion. My budget can go up to twice as much as this.

Thanks

2017-08-19 17:53:42 -0500 commented question Can we simulate a deformable object in Gazebo now?

Hi mzWang, Did you find a sol/workaround? If so let me know (I want to simulate rubber ball, vegitables etc) I assume u

2017-08-19 17:47:37 -0500 commented question Can we simulate a deformable object in Gazebo now?

Hi mzWang, Did you find a solution or a workaround? I also want to simulate deformable and soft objects like rubber bal

2017-08-19 17:46:39 -0500 commented question Can we simulate a deformable object in Gazebo now?

Hi mzWang, Did you find a solution or a workaround? I also want to simulate deformable objects, I was wondering which s

2016-11-24 08:30:48 -0500 received badge  Famous Question (source)
2016-11-24 08:30:28 -0500 received badge  Self-Learner (source)
2016-03-03 14:24:31 -0500 received badge  Nice Question (source)
2015-04-26 01:26:58 -0500 received badge  Famous Question (source)
2015-04-01 05:59:53 -0500 received badge  Famous Question (source)
2015-03-03 01:55:07 -0500 received badge  Famous Question (source)
2015-02-06 09:16:05 -0500 received badge  Self-Learner (source)
2015-02-06 09:16:05 -0500 received badge  Teacher (source)
2015-02-06 09:16:00 -0500 received badge  Good Question (source)
2015-01-15 13:36:46 -0500 received badge  Famous Question (source)
2014-12-11 07:48:09 -0500 received badge  Nice Question (source)
2014-12-07 16:53:07 -0500 received badge  Famous Question (source)
2014-07-21 20:26:58 -0500 received badge  Notable Question (source)
2014-07-20 22:33:43 -0500 received badge  Popular Question (source)
2014-07-20 11:11:08 -0500 answered a question Creating a better mesh

I found that this could be easily done using MLS (moving-least-squares).

The tutorial given at: http://pointclouds.org/documentation/... helps in generating smooth mesh.

However when I try to combine it with mesh generation code in one go, I got segmentation fault. Any help there is greatly appreciated. I have asked it at: http://answers.ros.org/question/18718...

2014-07-20 11:10:48 -0500 asked a question Unable to combine MLS and mesh generation in one file

Hi,

I am able to do MLS and then also generate mesh, but I need to do both of them separately. I am not able to find a way to do it in one go. First I do MLS and save the file. And then read that file again and generate mesh.

If I combine both I am encountering segmentation fault. The code does MLS successfully but than fails. The two tutorials which I tried to combine are:

Greedy projection : http://pointclouds.org/documentation/...

and

MLS : http://pointclouds.org/documentation/...

Also since MLS itself compute the surface normal so I commented the part of the code where normal are generated.

Any help of pointers is greatly appreciated.

Let me know if I ask PCL related questions somewhere else?

My combined code is:





int
main (int argc, char** argv)
{
  ros::init(argc, argv, "seg"); //is the third param node name
  ros::NodeHandle nh;
  int p_setKSearch = 20;
  double p_setSearchRadius = 0.025;
  double p_setMu = 2.5;

  double p_neighbours = 100;
  double p_maxSurfAnglePiDiv = 4; // 45 degrees
  double p_minAnglePiDiv =18; // 10 degrees

  double p_maxAnglePiDiv = 1.5; // 120 degrees
  bool p_normal_consist = false;
  std::string p_pcd_file = "/home/aknirala/chair.pcd";

  double lDv;   //Loaded double value
  int lIv;
  bool lBv;
  std::string lSv;

  std::cout<<"\n Getting the parameters...............";
  if(nh.getParam("/mesh/meshParam/p_setKSearch", lIv))          p_setKSearch = lIv;
  if(nh.getParam("/mesh/meshParam/p_setSearchRadius", lDv))     p_setSearchRadius = lDv;
  if(nh.getParam("/mesh/meshParam/p_setMu", lDv))               p_setMu = lDv;

  if(nh.getParam("/mesh/meshParam/p_neighbours", lDv))          p_neighbours = lDv;
  if(nh.getParam("/mesh/meshParam/p_maxSurfAnglePiDiv", lDv))   p_maxSurfAnglePiDiv = lDv;
  if(nh.getParam("/mesh/meshParam/p_minAnglePiDiv", lDv))       p_minAnglePiDiv = lDv;

  if(nh.getParam("/mesh/meshParam/p_maxAnglePiDiv", lDv))       p_maxAnglePiDiv = lDv;
  if(nh.getParam("/mesh/meshParam/p_normal_consist", lBv))      p_normal_consist = lBv;
  if(nh.getParam("/mesh/sourceFile", lSv))      p_pcd_file = lSv;

  std::cout<<"\n p_setKSearch : "<<p_setKSearch;
  std::cout<<"\n p_setSearchRadius : "<<p_setSearchRadius;
  std::cout<<"\n p_setMu : "<<p_setMu;

  std::cout<<"\n p_neighbours : "<<p_neighbours;
  std::cout<<"\n p_maxSurfAnglePiDiv : "<<p_maxSurfAnglePiDiv;
  std::cout<<"\n p_minAnglePiDiv : "<<p_minAnglePiDiv;

  std::cout<<"\n p_maxAnglePiDiv : "<<p_maxAnglePiDiv;
  std::cout<<"\n p_normal_consist : "<<p_normal_consist;
  std::cout<<"\n p_pcd_file : "<<p_pcd_file;

  // Load input file into a PointCloud<T> with an appropriate type
  pcl::PointCloud<pcl::PointXYZ>::Ptr cloud (new pcl::PointCloud<pcl::PointXYZ>);
  pcl::PCLPointCloud2 cloud_blob;
  pcl::io::loadPCDFile (p_pcd_file, cloud_blob);
  pcl::fromPCLPointCloud2 (cloud_blob, *cloud);     //What exactly is being converted here?
                                                     //cloud_blob may not be of type XYZ :-)
  //* the data should be available in cloud
  //Convert a PCLPointCloud2 binary data blob ---> into a pcl::PointCloud<T> object
  //Oh, so this is one of the way to load any point cloud type from a pcd file, which we do not
  // know before reading the file to desired point type. IN this case, to PointXYZ.






  /*
  // Normal estimation*
  pcl::NormalEstimation<pcl::PointXYZ, pcl::Normal> n;
  pcl::PointCloud<pcl::Normal>::Ptr normals (new pcl::PointCloud<pcl::Normal>);
  pcl::search::KdTree<pcl::PointXYZ>::Ptr tree (new pcl::search::KdTree<pcl::PointXYZ>);
  tree->setInputCloud (cloud);
  n.setInputCloud (cloud);
  n.setSearchMethod (tree);
  n.setKSearch (p_setKSearch);      //It was 20
  n.compute (*normals);             //Normals are estimated using standard method.
  //* normals should not contain the point ...
(more)
2014-07-20 11:00:37 -0500 received badge  Famous Question (source)
2014-07-20 11:00:37 -0500 received badge  Notable Question (source)
2014-07-20 11:00:37 -0500 received badge  Popular Question (source)
2014-06-29 13:17:11 -0500 asked a question Creating a better mesh

Hi,

I wanted to create mesh of household objects, so that I can later recreate the household scene in Gazebo. I want to use kinect and think that interactively, it can be done quite easily. My exact problem:

After capturing the scene using kinect, I am able to filter out chair, the front view of the chair looks: image description

However when I am trying to create a mesh from it (using PCL, tutorial at: http://pointclouds.org/documentation/... I am not able to set optimal size of triangles. My mesh looks like: image description

I need a smooth mesh. As if a low pass filter is passed on it. How can I achieve that.

Any help or pointer is greatly appreciated.

2014-06-16 09:52:16 -0500 commented answer Making a mesh model from a point cloud: What are the plans for the model_mesher from the tod_training package?

I know toooooooooo old a link, but is there anything like model mesher available as of now?

2014-04-20 14:13:53 -0500 marked best answer Using custom messages and service in ROSJAVA

Hi,

I have been trying to understand ROSJAVA from a while, seems a bit difficult as I couldn't find good tutorials (last week tutorials for Hydro were updated which was v v helpful (many many thanks for that), though they are not sufficient :-( ).

I am using Ubuntu 12.04 and Hydro.

I manage to run ROSJAVA Publishers and subscribers as directed at: http://rosjava.github.io/rosjava_core/latest/getting_started.html

I was able to run Talker from java end and listen it from C++ end, however I am still struggling to find out, how can I use my custom message. Here is my directory structure

~/catkin_ws (catkin workspace, in setup.sh I am doing source ~/catkin_ws/devel/setup.bash)

~/catkin_ws/src/foo_msgs/msg/foo.msg (contains std_msgs/String data)
~/catkin_ws/src/foo_msgs/srv/AddTwoInts.srv (for checking service, to be checked once I manage to run cutsom messgaes)
~/catkin_ws/src/foo_msgs/CMakeLists.txt  (contains entries to generate message as directed at : http://wiki.ros.org/ROS/Tutorials/CreatingMsgAndSrv)
~/catkin_ws/src/foo_msgs/package.xml


~/catkin_ws/src/myjava_pkgs (ROSJAVA package, created using : catkin_create_rosjava_pkg myjava_pkgs rosjava_bootstrap rosjava_messages foo_msgs)
~/catkin_ws/src/myjava_pkgs/foo_msgs (cretaed by : catkin_create_rosjava_msg_project foo_msgs
as given at : http://wiki.ros.org/rosjava/Tutorials/hydro/Unofficial%20Messages)
~/catkin_ws/src/myjava_pkgs/pub_sub (using: catkin_create_rosjava_project pub_sub, as given at: http://wiki.ros.org/rosjava_build_tools/Tutorials/hydro/Creating%20Rosjava%20Packages
This automatically created : ~/catkin_ws/src/myjava_pkgs/pub_sub/src/main/java/com/github/rosjava/pub_sub/Dude.java)

Then I created Talker.java and Listener.java in:-

~/catkin_ws/src/myjava_pkgs/pub_sub/src/main/java/org/ros/rosjava_tutorial_pubsub/

as given at: http://rosjava.github.io/rosjava_core/latest/getting_started.html

settings.gradle at ~/catkin_ws/src/myjava_pkgs contains:-

include 'foo_msgs'
include 'pub_sub'

I updated ~/catkin_ws/src/myjava_pkgs/pub_sub/build.gradle seeing http://wiki.ros.org/rosjava_core/graveyard/rosjava_tutorial_pubsub The exact content of build.gradle is:-

apply plugin: 'application'

mainClassName = 'org.ros.RosRun'

apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'eclipse'

// uncomment to create an eclipse project using 'gradle eclipse'
//apply plugin: 'eclipse'

sourceCompatibility = 1.6
targetCompatibility = 1.6

// custom maven repository for some rosjava dependencies
repositories {
  mavenLocal()
  maven {
    url 'http://robotbrains.hideho.org/nexus/content/groups/ros-public'
  }
}

// we need this for maven installation
version = '0.0.0-SNAPSHOT'
group = 'ros.my_stack'

dependencies {
  compile 'org.ros.rosjava_core:rosjava:[0.1,)'
}

Now, I am able to compile it from: /catkin_ws/src/myjava_pkgs/pub_sub$ using: ../gradlew installApp

and able to run Talker using: ./build/install/pub_sub/bin/pub_sub org.ros.rosjava_tutorial_pubsub.Talker

My questions are:-

  1. How can I use my custom message, which is in foo.msg?
    On compiling I can see that header files for foo.msg and service are generated at:
    /home/aknirala/catkin_ws/devel/include/foo_msgs and java files are generated at:-
    /home/aknirala/catkin_ws/src/myjava_pkgs/foo_msgs/build/generated-src/foo_msgs
    But how w=can I include it? If I include the line:-
    import foo_msgs.foo;
    
    I get compilation error as:-
    /home/aknirala/catkin_ws/src/myjava_pkgs/pub_sub/src/main/java/org/ros/rosjava_tutorial_pubsub/Talker.java:10: package foo_msgs does ...
(more)
2014-04-20 14:06:39 -0500 marked best answer Running PCL in Hydro

Hi,

It took me a while to run the sample code for down-sampling a point cloud using voxel grid, as given in tutorial page at : http://wiki.ros.org/pcl/Tutorials?action=AttachFile&do=view&target=example_voxelgrid.cpp, tutorial link : http://wiki.ros.org/pcl/Tutorials
I am using ROS Hydro on Ubuntu12.04, and catkin build. I am thinking of updating these links and add code for Hydro. Kindly let me know if some changes I made are redundent etc. Specifically I made the following changes:-

  1. Code :
    • Deleted : #include <pcl/ros/conversions.h>
      Added: #include <pcl_conversions/pcl_conversions.h>
        #include <sensor_msgs/PointCloud2.h>
    • Modified the callback function to use pcl::PCLPointCloud2 instead of sensor_msgs::PointCloud2 as:-
      (It's given at hydro migration : http://wiki.ros.org/hydro/Migration)
      void 
      cloud_cb (const pcl::PCLPointCloud2ConstPtr& input)
      {
        pcl::PCLPointCloud2 cloud_filtered;
        pcl::VoxelGrid<pcl::PCLPointCloud2> sor;
        sor.setInputCloud (input);
        sor.setLeafSize (0.01, 0.01, 0.01);
        sor.filter (cloud_filtered);
      
        // Publish the dataSize 
        pub.publish (cloud_filtered);
      }
      
  2. IN package.xml (from http://wiki.ros.org/hydro/Migration
    (....pcl is no longer packaged by the ROS community as a catkin package, so any packages which directly depend on pcl should instead use the new rosdep rules libpcl-all and libpcl-all-dev...... )
    and understood it (I think) by seeing the post at http://www.pcl-users.org/How-do-I-use-PCL-from-ROS-Hydro-td4029613.html (3rd comment : given by, Matteo Munaro Sep 12, 2013; 3:46pm), and also https://github.com/ros-perception/pcl_conversions/commit/a868e1a16e442c135f66a9738619d290bc4ee896)
    Removed: build_depend>pcl</build_depend>
           <run_depend>pcl</run_depend>
    Added: <build_depend>libpcl-all-dev</build_depend>
           <run_depend>libpcl-all</run_depend>
    I am wondering if the addition of libpcl-all-dev and libpcl-all, could automatically be done while creting the package.
  3. In CMakeList.txt
    Removed: pcl dependency Added: pcl_conversions dependency
    Again seeing the above mentioned link. Note: This could also be achieved by changing the package creation line to : catkin_create_pkg my_pcl_tutorial pcl_conversions pcl_ros roscpp sensor_msgs

I am quite sure that these changes must be done by many ppl who have run this tutorial and quite sad that they were not updated. Changes are a bit trivial once you understand, but still tutoral should run without giving any error, so that ppl like me could understand things easily :-).
Also is there a way to get libpcl-all-dev and libpcl-all directly in package.xml while creating the package.

2014-04-20 13:36:28 -0500 marked best answer Finding a frame pose given pose (calculated) of another frame

Hello everyone,

I am publishing r_gripper_pick_pose as, say, :

 <node name="btw_bl_rpp" pkg="tf" type="static_transform_publisher" args=
  "3  1   8     0 0 0 1     base_link        r_gripper_pick_pose 10" 
  respawn="false" output="screen" />

I calculate the pose (with direction) for this frame (r_gripper_pick_pose) (say to pick up sth). Lets call it Calc_grasp_pose.

How can I find the base_link (i.e, robot pose) pose wrt the Calc_grasp_pose?

I guess I can not use TF for this as there is no frame being published which is b/w existing farmes and r_gripper_pick_pose. i.e, how can I use TF, if at all, to get new pose with transformation between two poses instead of two frames?

I am using ros electric.

Update:-

For clarification consider the following figure : image description

Consider a) I am considering base_link to be at origin. And all poses are described wrt it.

And for this case consider that robot is at orientation of 0 degrees if it is facing in +y direction (unlike +x in usual case of PR2 (i realized this after drawing the figure :-) ))

I need to move the robot (described by the big circle, with its gripper pose frame described by a small circle) such that its gripper is at the desired pose of (-5,3,8) and orientation (w,x,y,z) : (0,0,0,1), which is my calc_grasp_pose

So my desired situation is b). So I need the pose : (-4,1,0) and (w,x,y,z) : (0.7071, 0, 0, 0.7071) as output.

if I simply define the desired pose in r_gripper_pick_pose and use transformPose to get it into the base_link frame I will get back the desired pose of the r_gripper_pick_pose only or calc_grasp_pose. (Correct me if I am wrong)

The reason why I think I can't use TF is : the transformation between calc_grasp_pose and poses of other frames (like r_gripper_pick_pose, base_link) is dynamic and is not in tf.

calc_grasp_pose is not a frame, it is not published.

So one way for me could be to find the rotation and translation matrix which when applied to current r_gripper_pick_pose translates it to calc_grasp_pose, and then apply the same to base_link (in the picture base_link is at origin, but it could be anywhere). As described at : http://web.iitd.ac.in/~hegde/cad/lecture/L6_3dtrans.pdf

Is there any existing function which I can use in tf or some other place which I can use?

Thnks.

2014-04-20 13:35:06 -0500 marked best answer resetting turtlebot odometry in simulation

Hi,

Is there a way to reset the odometry in simulation of turtlebot.

When I reset the Gazebo world the data published via topic /odom and /robot_pose_ekf/odom remains unchanged. Probably that is because it is not part of the gazebo.

Is there a way I can reset it.

Edit : I am using electric on Ubuntu 11.10

2014-04-20 13:33:54 -0500 marked best answer how to display rviz markers at a fixed location

Hi,

I need to display markers (currently few arrows, showing path for robot) at a fixed point wrt my simulated environment. The environment has turtlebot and few objects.

While publishing markers if I set marker.header.frame_id = "/odom", then I get the desired result as long as robot does not collide or I don't reset the environment.

Before publishing the markers if I call service /gazebo/get_model_state and get the robot state, and use that to apply inverse transformation to the markers, and use /base_link in marker.header.frame_id, then I get what I need.

But I am sure there must be a simpler way to do this. What should be my frame in marker.header.frame_id

or

how can I use TF to do this easily. As of now I am using only 2D inverse transformation, so when robot collides then for some time the markers are displayed at different location.

I am using electric on Ubuntu 11.10

2014-04-20 13:21:58 -0500 marked best answer Doing navigation, while avoiding some region

Hi All,

I am using navigation stack with PR2 and turtlebot in a simulated home environment. Is it possible to constrain the path of the robot so that it can avoid some region. For example, say floor of the room has white tiles with few red tiles at center, and I want the robot, not to run over the red tiles. Or say there is some marking or carpeting on the path (having different color), and I need the robot to do navigation only on that path.

Any suggestion or pointers on how I can achieve this will be greatly appreciated.

I needed this for executing action for a command like : "Move to the chair, avoiding the red region."

2014-04-20 13:07:19 -0500 marked best answer Unable to include .model files for objects in .world file (for simulation) in Ubuntu 12.04 fuerte

Hi,

After installing Ubuntu 12.04 and fuerte (today), I am unable to launch most of my world file, which were running smoothly on electric on Ubuntu 11.10.

as per the error I think there is some new way to include .model file of an object in the .world file. Kindly provide me the pointers for that.

To test (that error is not with my made .world and .model files), I included simple_office_table.world file from gazebo_world package.

The .model files are included as : (in simple_office_table.world file)

.
.
  <model:physical name="desk4_model">
    <xyz>2.28  -0.21  0</xyz>
    <rpy>0.0 0.0 0.0 </rpy>
    <include embedded="true">
<xi:include href="../objects/desk4.model" />
    </include>
  </model:physical>


  <model:physical name="desk5_model">
    <xyz>2.25  -3.0   0</xyz>
    <rpy>0.0 0.0 0.0 </rpy>
    <include embedded="true">
      <xi:include href="../objects/desk5.model" />
    </include>
  </model:physical>
.
.

and my launch file is

<launch>
  <arg name="use_sim_time" default="true"/>
  <arg name="gui" default="true"/>

  <group if="$(arg gui)">
    <node name="gazebo_gui" pkg="gazebo" type="gui" respawn="false" output="screen"/>
  </group>

</launch>

When I launch it in fuerte I get error saying Opening and ending tag mismatch, as:-

Msg Waiting for master.Warning [parser.cc:348] Gazebo SDF has no gazebo element
Entity: line 211: parser error : Opening and ending tag mismatch: physical line 206 and include
</include>
          ^
Entity: line 212: parser error : Opening and ending tag mismatch: world line 3 and physical
</model:physical>
                 ^
Entity: line 215: parser error : Extra content at the end of the document
<model:physical name="desk5_model">
^
Error [parser_deprecated.cc:1365] Could not parse the xml
Entity: line 211: parser error : Opening and ending tag mismatch: physical line 206 and include
</include>
          ^
Entity: line 212: parser error : Opening and ending tag mismatch: world line 3 and physical
</model:physical>
                 ^
Entity: line 215: parser error : Extra content at the end of the document
<model:physical name="desk5_model">
^
Error [parser_deprecated.cc:1307] Could not parse the xml
Error [parser.cc:263] parse as old deprecated model file failed.
Error [Server.cc:196] Unable to read sdf file[/opt/ros/fuerte/stacks/simulator_gazebo/gazebo_worlds/worlds/simple_office_table.world]
[gazebo-2] process has died [pid 9413, exit code 255, cmd /opt/ros/fuerte/stacks/simulator_gazebo/gazebo/scripts/gazebo /opt/ros/fuerte/stacks/simulator_gazebo/gazebo_worlds/worlds/simple_office_table.world __name:=gazebo __log:=/home/nirala/.ros/log/a44e752a-fdd7-11e1-b21f-7071bc63a65c/gazebo-2.log].
log file: /home/nirala/.ros/log/a44e752a-fdd7-11e1-b21f-7071bc63a65c/gazebo-2*.log
^C[gazebo_gui-3] killing on exit

Error [ConnectionManager.cc:89] Connection Manager is not running
[rosout-1] killing on exit
[master] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done

apart from the harmless AttributeError as discussed at : http://answers.ros.org/question/34304/exception-attributeerror-when-starting-roscore/

A similar error is also posted at : http://answers.ros.org/question/29622/import-dae-gazebo-100-rc2/

Am I missing some small configuration or tags somewhere? Kindly help me out.

2014-04-20 13:06:43 -0500 marked best answer Making revolute joint stay at rest, if no effort/wrench is applied

Hi,

As posted at : http://answers.ros.org/question/12965/spawn-urdf-joint-stiffness/

the solution for keeping a revolute joint fixed seems to be writing a controller for it. However a controller would be required if it is for a robot (and then I can control it with code directly). However, if the joint is associated with an object (like door, say of a closet) and if it is to be manipulated by robot actuators then I guess controller is not needed (for the door).

Or do I need to write the controller in this case also?

But now, the door is moving slowly from lower angle to upper and vice versa, w/o any outer effort. How can I stop this?

Specifically, I have created URDF for a closet. It has two doors with revolute-joint. The joint description is (for left joint):

  ....<link name="L_door">
<visual>
  <origin rpy="0 0 0" xyz="0.248125 0.0075  0"/>
  <geometry>
    <box size="0.48875 0.015 0.785"/>
  </geometry>
  .
  .
  .
</visual>
<collision>
  <origin rpy="0 0 0" xyz="0.248125 0.0075  0"/>
  <geometry>
    <box size="0.48875 0.015 0.785"/>
  </geometry>
</collision>
<inertial>
  <origin xyz="0.248125 0.0075 0"/>
  <mass value="2"/>
  <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
</inertial>

</link>

I added the joint as

<joint name="L_door_joint" type="revolute">
    <origin rpy="0 0 0" xyz="-0.48875 0 0.6"/>
    <axis xyz="0 0 1"/>
    <limit effort="1000" lower="-1.67075" upper="0.1" velocity="10"/>
    <safety_controller k_position="100.0" k_velocity="10.0" soft_lower_limit="1.57075" soft_upper_limit="0.0"/>
    <dynamics damping="100" friction="0.0"/>
    <parent link="L_side"/>
    <child link="L_door"/>
  </joint>

I also added following lines from the urdf of door from(changing the link names etc) http://ros.org/wiki/pr2_simulator/Tutorials/PR2OpenDoor,(I am not sure about the functionality of these tags though, they do not seem to have any effect).

<gazebo reference="L_door">
<latchJoint>L_door_joint</latchJoint>
<latchAngle>-1.67075</latchAngle>
<doorClosedAngle>0.1</doorClosedAngle>
<latchKp>200.0</latchKp>
<latchKd>0.0</latchKd>
<latchFMax>1000.0</latchFMax>

</gazebo>

Any suggestions/links is greatly appreciated.

2014-04-20 13:05:35 -0500 marked best answer URDF tags for creating objects involving curved surfaces and body parts

Hi,

I am trying to create objects for indoor environment. (Though I am hoping that these objects must be already created by someone, I asked that at: http://answers.ros.org/question/42435/pointers-to-office-and-home-environment-in-gazebo/)

I created a chair in urdf. The chair looks like:-

chair

The back-support of the chair has three cylinders and all are straight. However I need them to be a bit circular. How to achieve that?

I couldn't find any useful tags at : http://www.ros.org/wiki/urdf/XML

Where can I find all the tags interpreted by urdf.

I also saw the urdf of door from http://ros.org/wiki/pr2_simulator/Tutorials/PR2OpenDoor,

It contains a door.urdf, which has tags like:-

  <gazebo reference="door_link">
    <latchJoint>handle_joint</latchJoint>
    <latchAngle>-1.57</latchAngle>
    <doorClosedAngle>0.0</doorClosedAngle>
    <latchKp>200.0</latchKp>
    <latchKd>0.0</latchKd>
    <latchFMax>1000.0</latchFMax>
  </gazebo>

I guess these tags (latchAngle, doorClosedAngle) are defining the two states of the door (open/close). Are these tags custom made (I didn't went through the entire code as door opening is not supported after diamondback) or are standard?

Any pointers/suggestions/links/comment is greatly appreciated.

Also is there any tool which I can use to create object quickly?



Edit 1 @Adolfo Rodriguez T:-
I am not able to launch the .dae file :-(, (it seems it need further processing, as .dae files in gazebo_world are getting launched). What am I doing wrong? If I am able to spawn and use these models it will save a lot of time for me.
I downloaded chair from link provided by you (.zip version). It contained :-

  1. Nelson_Swag_Leg_Chair/models/Nelson_Swag_Leg_Chair.dae
  2. Nelson_Swag_Leg_Chair/doc.kml
  3. Nelson_Swag_Leg_Chair/textures.txt (its 0 bytes)

(I have replaced spaces with _ in file and folder names, hope thats not an issue).

My .model file (which does not work at all):-

<model name="Nelson_Swag_Leg_Chair" static="true">
    <link name="Nelson_Swag_Leg_Chair">
        <origin pose="0 0 0 0 0 0"/>
        <collision>
            <geometry>
                <mesh filename="/home/nirala/ros_workspace/myWorld/world/object/Nelson_Swag_Leg_Chair/models/Nelson_Swag_Leg_Chair.dae" scale="1 1 1"/>
            </geometry>
        </collision>
        <visual>
            <geometry>
                <mesh filename="package://myWorld/world/object/Nelson_Swag_Leg_Chair/models/Nelson_Swag_Leg_Chair.dae" scale="1 1 1"/>
            </geometry>
        </visual>
    </link>
</model>

and launch file as:-

<launch>
  <param name="Nelson_Swag_Leg_Chair_p" textfile="$(find myWorld)/world/object/Nelson_Swag_Leg_Chair/Nelson_Swag_Leg_Chair.model" />
  <node name="Nelson_Swag_Leg_Chair" pkg="gazebo" type="spawn_model" args="-gazebo -param Nelson_Swag_Leg_Chair_p -z 0.1 -y 2 x -x 2 -model Nelson_Swag_Leg_Chair" respawn="false" output="screen"/>
</launch>

But this gave me error as:-

[ERROR] [1346749562.693001448, 982.362000000]: GazeboROSNode SpawnModel Failure: input model_xml not Gazebo XML, or cannot be converted to Gazebo XML

Then I tried to make an urdf file as:-

<?xml version="1.0"?>
<robot name="Nelson_Swag_Leg_Chair_U">
  <link name="Nelson_Swag_Leg_Chair_n">
    <visual>
      <origin rpy="0 0 0" xyz="0.09137 0.00495 1"/>
      <geometry>
        <mesh filename="package://myWorld/world/object/Nelson_Swag_Leg_Chair/models/Nelson_Swag_Leg_Chair.dae" scale = ".1 .1 .1"/>
      </geometry>
    </visual>
    <collision>
      <geometry>
        <mesh filename="package://myWorld/world/object/Nelson_Swag_Leg_Chair/models/Nelson_Swag_Leg_Chair.dae" scale = ".1 .1 .1"/>
      </geometry>
      <origin rpy="0 ...
(more)
2014-04-20 13:01:40 -0500 marked best answer Might be a small bug in moving the arm tutorial, how to correct such issues?

I am using electric on Ubuntu 11.10

While going through the tutorial at : http://www.ros.org/wiki/pr2_controllers/Tutorials/Moving%20the%20arm%20through%20a%20Cartesian%20pose%20trajectory

I was unable to run it using the python client, But directly using the command line as explained worked nicely. I got


$python scripts/test_ik_trajectory_tutorial.py
Traceback (most recent call last):
  File "scripts/test_ik_trajectory_tutorial.py", line 69, in <module>
    success = call_execute_cartesian_ik_trajectory("/base_link", positions, orientations)
  File "scripts/test_ik_trajectory_tutorial.py", line 19, in call_execute_cartesian_ik_trajectory
    header = roslib.msg.Header()
AttributeError: 'module' object has no attribute 'msg'

This seemed like a straight forward issue and must be faced by other people as well, but I couldn't find the answer to exact error. Luckily when I googled with 'roslib.msg.Header()' and in google search page saw

#4784 (actionlib uses roslib.msg.Header instead of rospy.Header .............

I simply changed the


header = roslib.msg.Header()

to


header = rospy.Header();

and it worked!!!!

My question is : Is it specific to electric? Or only I am facing this? Or is it a valid bug? On my machine at /opt/ros/electric/ros/core/roslib/src/roslib/ there is no msg.py file but msgs.py and when I changed msg to msgs I got error on Header().

However if this is a valid bug (though small one then) how could it be corrected on the tutorial?