-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CREO2URDF – Wrong transform when exporting a sensors that uses a csys not present in exportedFrames list #77
Comments
Actually seems that it is not due to the fact that the frame is already used, because I tried to export an imu that uses the FT frame and I am getting the same (wrong) result indipendently both when I export also the ft and when I do not export it. In the message window I am getting this error that is quite strange, since this frame is used for exporting the ft sensor, I will investigate further
cc @mfussi66 |
This problem seems to be related to: With the solution proposed this issue should not happen if In particular, for the ft sensor, we do not use the creo2urdf/src/creo2urdf/src/Sensorizer.cpp Lines 105 to 125 in 3d72a45
On the other hand for the sensors we use the creo2urdf/src/creo2urdf/src/Sensorizer.cpp Lines 221 to 235 in 3d72a45
It should not to be too difficult to fix it, but I need to align w/ @mfussi66 for understanding why there is this difference |
This allows to export a sensor with a frame not specified in exportedFrames. It fixes #77.
This PR: Should fix the issue, here is the resulting sensor: <gazebo reference="l_ankle_2">
<sensor name="l_foot_rear_imu" type="imu">
<always_on>1</always_on>
<update_rate>100.000000</update_rate>
<pose>0.016 -2.77556e-17 -0.0479 -4.25919e-17 -7.51333e-17 -2.0944 </pose>
<plugin name="ergocub_yarp_gazebo_plugin_l_foot_rear_IMU" filename="libgazebo_yarp_imu.so">
<yarpConfigurationFile>model://ergoCub/conf/gazebo_ergocub_inertial.ini</yarpConfigurationFile>
</plugin>
</sensor>
</gazebo>
<sensor name="l_foot_rear_imu" type="accelerometer">
<parent link="l_ankle_2"/>
<origin rpy="-4.25919e-17 -7.51333e-17 -2.0944 " xyz="0.016 -2.77556e-17 -0.0479"/>
</sensor> This is similar to the one added as xmlBlob by @GiulioRomualdi - |
<gazebo reference="l_ankle_2">
<sensor name="l_foot_rear_ft_imu" type="imu">
<always_on>1</always_on>
<update_rate>100</update_rate>
<pose>0.016000000000000004 0 -0.07019999999999993 0.0 -0.0 -2.0943952105869315</pose>
<plugin name="ergocub_yarp_gazebo_plugin_IMU" filename="libgazebo_yarp_imu.so">
<yarpConfigurationFile>model://ergoCub/conf/gazebo_ergocub_l_foot_rear_ft_sensor_inertial.ini</yarpConfigurationFile>
</plugin>
</sensor>
</gazebo>
- |
<sensor name="l_foot_rear_ft_imu" type="accelerometer">
<parent link="l_ankle_2" />
<origin rpy="0.0 -0.0 -2.0943952105869315" xyz="0.016000000000000004 0 -0.07019999999999993" />
</sensor> the only difference is on the Z 🤔 |
It should be placed in the FT. Nothing prevents an error in the proposed xml blob. Can you generate the robot model so I can do a similar test done in icub-tech-iit/ergocub-software#217 (comment) ? |
I think that the correct one seems to be the one I obtained after the fix, the ft sensor is not associated to a link but a joint, and the reference frame of a joint is the child link frame (in our case <joint name="l_foot_rear_ft_sensor" type="fixed">
<origin xyz="0.015999999999999986 -4.163336342344337e-17 -0.04789999999999994" rpy="-1.0970096963229695e-30 1.942890293093975e-16 2.0306083615826833e-17"/>
<parent link="l_ankle_2"/>
<child link="l_foot_rear"/>
</joint> <gazebo reference="l_foot_rear_ft_sensor">
<sensor name="l_foot_rear_ft" type="force_torque">
<always_on>1</always_on>
<update_rate>100</update_rate>
<force_torque>
<frame>sensor</frame>
<measure_direction>parent_to_child</measure_direction>
</force_torque>
<pose>0 0 0 1.25667e-16 2.20112e-17 -2.0944 </pose>
<plugin name="left_foot_rear_ft_plugin" filename="libgazebo_yarp_forcetorque.so">
<yarpConfigurationFile>model://ergoCub/conf/FT/gazebo_ergocub_left_foot_rear_ft.ini</yarpConfigurationFile>
</plugin>
</sensor>
</gazebo> If we refer to I don't know if it is sufficient but I have an urdf with only that imu added: |
Hi @Nicogene you are right! I visualized your model and what I proposed in ergocub-software Your modelHere I asked to plot the following frames testFrames = {'l_foot_rear_imu', 'l_foot_rear_ft', 'l_sole'}; %% The frames to display As you can notice model I proposed in ergocub-softwareI asked to plot the same frame. Here you can notice that the frame are not coincident! |
This allows to export a sensor with a frame not specified in exportedFrames. It fixes #77.
This allows to export a sensor with a frame not specified in exportedFrames. It fixes #77.
This allows to export a sensor with a frame not specified in exportedFrames. It fixes #77.
Hi @GiulioRomualdi, if you or Guglielmo can double check these changes: We can merge both the PR in ergocub-software and creo2urdf |
I will test it today :) |
This allows to export a sensor with a frame not specified in exportedFrames. It fixes #77.
Given a configuration file as follow:
The ft sensor is correctly exported, on the other hand, the sensor (imu) is exported coincident w/
linkName
frameBut instead there is a transform between the
frameName
andlinkName
cys:cc @GiulioRomualdi @mfussi66
The text was updated successfully, but these errors were encountered: