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

Publish physics engine data #400

Open
eomielan opened this issue Jun 10, 2024 · 1 comment
Open

Publish physics engine data #400

eomielan opened this issue Jun 10, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request sim Boat Simulator team

Comments

@eomielan
Copy link
Member

eomielan commented Jun 10, 2024

Purpose

The purpose of this issue is to update the physics engine node to publish real data obtained from the physics engine to the ROS network.

Description

Update __publish_kinematics() to publish real data instead of hardcoded values to the ROS network. You can assume that the boat state (self.__boat_state) has been updated elsewhere.
Please update the following parts of the ROS message to publish real data:

  • msg.global_pose
  • msg.wind_velocity
  • msg.current_velocity

Ressources

@eomielan eomielan added enhancement New feature or request sim Boat Simulator team labels Jun 10, 2024
@github-project-automation github-project-automation bot moved this to Backlog in SOFT Project Jun 10, 2024
@eomielan eomielan moved this from Backlog to Todo in SOFT Project Jun 10, 2024
@eomielan eomielan assigned evannawfal and unassigned tanmaythakral Jul 18, 2024
@alberto-escobar alberto-escobar linked a pull request Sep 28, 2024 that will close this issue
@alberto-escobar
Copy link
Contributor

implemented the following in __publish_kinematics

        # had to make elements into float or else I would get issues
        msg.global_pose.position.x = float(self.__boat_state.global_position[0])
        msg.global_pose.position.y = float(self.__boat_state.global_position[1])
        msg.global_pose.position.z = float(self.__boat_state.global_position[2])
        msg.global_pose.orientation.x = float(self.__boat_state.angular_position[0])
        msg.global_pose.orientation.y = float(self.__boat_state.angular_position[1])
        msg.global_pose.orientation.z = float(self.__boat_state.angular_position[2])
        msg.global_pose.orientation.w = 1.0

        msg.wind_velocity.x = self.__wind_generator.velocity[0]
        msg.wind_velocity.y = self.__wind_generator.velocity[1]
        msg.wind_velocity.z = self.__wind_generator.velocity[2]

        msg.current_velocity.x = self.__current_generator.velocity[0]
        msg.current_velocity.y = self.__current_generator.velocity[1]
        msg.current_velocity.z = self.__current_generator.velocity[2]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request sim Boat Simulator team
Projects
Status: Todo
Development

When branches are created from issues, their pull requests are automatically linked.

4 participants