Skip to content
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

How can I add a FT sensor? #170

Open
solid-sinusoid opened this issue Aug 8, 2023 · 2 comments
Open

How can I add a FT sensor? #170

solid-sinusoid opened this issue Aug 8, 2023 · 2 comments

Comments

@solid-sinusoid
Copy link

solid-sinusoid commented Aug 8, 2023

At the moment I need to add FT sensor measurement, can I do it like IMU sensor? As I noticed there is no corresponding protobuf message like IMU, is it enough for me to use Wrench? At the moment I'm just exploring the possibilities

Something like this:

class FTData
{
public:
    std::string name{};
    std::string topicName{};
    ignition::gazebo::Entity sim_ft_sensors_ = ignition::gazebo::kNullEntity;
    std::array<double, 6> ft_sensor_data_;
    void OnFT(const ignition::msgs::Wrench & msg);
};

void FTData::OnFT(const ignition::msgs::Wrench & _msg)
{
    this->ft_sensor_data_[0] = _msg.torque().x();
    this->ft_sensor_data_[1] = _msg.torque().y();
    this->ft_sensor_data_[2] = _msg.torque().z();
    this->ft_sensor_data_[3] = _msg.force().x();
    this->ft_sensor_data_[4] = _msg.force().y();
    this->ft_sensor_data_[5] = _msg.force().z();
}

My setup:

  • ROS2 Humble
  • Ubuntu 22.04
  • Gazebo Fortress
  • gz_ros2_control from humble branch building from source
@solid-sinusoid
Copy link
Author

I would like to add FTS interface like in #13

@solid-sinusoid
Copy link
Author

solid-sinusoid commented Aug 16, 2023

@destogl I would be create a force torque sensor interface as lib as you said but in the main gz_ros2_control node i have a trouble with ClassLoader because it seems to be assumed just have a SystemInterface plugins. You can check my fork if interest. I don't know the best way to do this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant