pal-robotics / pal_hardware_gazebo

2 stars 5 forks source link

ft_wrench for gazebo 8 #3

Open PedroDesRobots opened 5 years ago

PedroDesRobots commented 5 years ago

Hi,

I'm using gazebo 8, ROS kinetic and Ubuntu 16.04. We need to modify this file pal_hardware_gazebo.cpp

    ft->force[0] = ft_wrench.body2Force.x;
    ft->force[1] = ft_wrench.body2Force.y;
    ft->force[2] = ft_wrench.body2Force.z;
    ft->torque[0] = ft_wrench.body2Torque.x;
    ft->torque[1] = ft_wrench.body2Torque.y;
    ft->torque[2] = ft_wrench.body2Torque.z;

By :

    ft->force[0] = ft_wrench.body2Force[0];
    ft->force[1] = ft_wrench.body2Force[1];
    ft->force[2] = ft_wrench.body2Force[2];
    ft->torque[0] = ft_wrench.body2Torque[0];
    ft->torque[1] = ft_wrench.body2Torque[1];
    ft->torque[2] = ft_wrench.body2Torque[2];

to be able to compile without errors.

v-lopez commented 5 years ago

Have you seen you tried the melodic devel branch?

We support gazebo 9 there, and gazebo 7 on the kinetic devel branch, which are the official versions for these distributions.

PedroDesRobots commented 5 years ago

I was trying kinetic devel branch :

~/catkin_ws/src/pal_hardware_gazebo$ git branch
* kinetic-devel

When I'm doing catkin_make, I got this error :

~/catkin_ws/src/pal_hardware_gazebo/src/pal_hardware_gazebo.cpp:363:45: error: 'ignition::math::Vector3d {aka class ignition::math::Vector3<double>}' has no member named 'x'
         ft->force[0] = ft_wrench.body2Force.x;

So, I have replaced like above and it works.