Robotic-Decision-Making-Lab / alpha

ROS 2 interface for the Reach Alpha 5 manipulator.
MIT License
10 stars 2 forks source link

[BUG]: AlphaHardware incorrectly configures velocity command interface #52

Closed evan-palmer closed 1 year ago

evan-palmer commented 1 year ago

Issue Description

The velocity command interface does not work on hardware. This is because the export_command_interfaces sets the velocity command interface to the state interface instead of the velocity interface. That is instead of being set to this

info_.joints[i].name, hardware_interface::HW_IF_VELOCITY, &hw_commands_velocities_[i]

The line is set to this

info_.joints[i].name, hardware_interface::HW_IF_VELOCITY, &hw_states_velocities_[i]

Steps to Reproduce

Launch the system using

ros2 launch alpha_bringup alpha.launch.py use_fake_hardware:=false serial_port:=/dev/ttyUSB0 robot_controller:=forward_velocity_controller

Send a command to the velocity interface

Expected Behavior

The command interface should successfully send the commands.

Error Message

No response

Runtime Environment

Docker container running on a Raspberry Pi 4

Additional Context

No response