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 gyro info #14

Merged
merged 2 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ jobs:
os: [self-hosted]
python-version: [3.8]
steps:
- name: Check if PR is from owner's repository
id: check-owner
run: |
if [[ "${{ github.actor }}" == "owner_username" ]]; then
echo "::set-output name=is_owner::true"
else
echo "::set-output name=is_owner::false"
fi
- uses: actions/checkout@v3
- name: Set up Python for Self-Hosted Linux arm64
uses: iory/[email protected]
Expand All @@ -58,7 +66,12 @@ jobs:
coverage erase
coverage run -m pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered tests
coverage xml
- name: Step for Owner's PR Only
if: steps.check-owner.outputs.is_owner == 'true'
run: |
echo "This step runs only for PRs from the owner's PR"
- name: Pytest coverage comment
if: steps.check-owner.outputs.is_owner == 'true'
uses: MishaKav/pytest-coverage-comment@main
with:
pytest-xml-coverage-path: ./coverage.xml
Expand Down
3 changes: 3 additions & 0 deletions ros/kxr_controller/node_scripts/rcb4_ros_bridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,9 @@ def create_imu_message(self):
q_wxyz = self.arm.read_quaternion()
(msg.orientation.w, msg.orientation.x,
msg.orientation.y, msg.orientation.z) = q_wxyz
_, gyro = self.arm.gyro_norm_vector()
(msg.angular_velocity.x, msg.angular_velocity.y,
msg.angular_velocity.z) = gyro
return msg

def run(self):
Expand Down
Loading