hello Ben,
Thank you, you were right, one of my mistakes was to add the  
<providefeedback>true</providefeedback> tag.

The other meaningless mistake is that i was using
<joint: name="slider_sensor"/>
instead of
<joint name="slider_sensor">
        </joint>

Now after i started receiving data, i have a new question.. what is  
the meaning of these data??

Let's say i have one slider joint. Here's a section of my trial  
libgazebo client code:

   int f;
   int i;
   int count;

   for(;;)
   {
        count=OpIface->data->data_count;
         cout<<"data count: "<<count<<endl;

        for(i=0;i<count;i++)
        {
                f=OpIface->data->data[i];
                cout<<f<<"    ";
        }
        cout<<endl<<endl;
        usleep(1000000);
   }
i am getting count=64!!

i understand i should be receiving 4 vectors containing f1,t1,f2 and  
t2 with vector elements x,y,z and a 4th one (which means 16 integers).  
but apparently each of the  x,y,z and the 4th one is a vector with 4  
values.
This is really confusing. How can i get one final value for the force?

If you can provide one, an example of a code using the opaque  
interface would be really helpful.

regards
Bassam Jalgha






Hi,
I can't verify right now (not at work), but I think you have to add a
<providefeedback>true</providefeedback> tag somewhere inside your
joint:slider tag. Let me know if you still have problems. If so, I will try
and get an example from our server next time I'm at a PC with an ssh client.

Good luck,
Ben

2008/12/23 Bassam Jalgha <[email protected]>

[Hide Quoted Text]
> Hello,
> I am using Gazebo SVN.
>
> I want to create a model of a unidirectional force sensor. I have seen
> in a previous post that the best way to do it is to create a slider
> joint and then get the force information from there.
> In order to get the joint force information i have used the jointforce
>  controller and the opaque interface.
>
> here is that part of my world file:
>
>   <joint:slider name="slider_sensor">
>     <body1>base_body</body1>
>     <body2>sensor_body</body2>
>     <anchor>sensor_body</anchor>
>
>     <axis>0 0 1</axis>
>     <lowStop>0</lowStop>
>     <highStop>0.07</highStop>
>     <erp>0.3</erp>
>     <cfm>0.8</cfm>
>   </joint:slider>
>
>
> <controller:jointforce name="joint_force">
>         <joint: name="slider_sensor"/>
>         <interface:opaque name="force_iface_0"/>
> </controller:jointforce>
>
> Then in my libgazebo client code i am connecting successfully to
> OpaqueIface but  if i output OpIface->data->data_count i get a zero.
> and i am getting blank data with OpIface->data->data[anything].
>
> Please help me out and tell me where i am doing wrong.
> let me know if there is anything similar to what i am doing already
> available
>
> Thank you
> Bassam Jalgha
Bassam Jalgha


------------------------------------------------------------------------------
_______________________________________________
Playerstage-gazebo mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo

Reply via email to