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

[canopen_motor_node] variable initialization #414

Open
vincentrou opened this issue Dec 4, 2020 · 1 comment
Open

[canopen_motor_node] variable initialization #414

vincentrou opened this issue Dec 4, 2020 · 1 comment

Comments

@vincentrou
Copy link

The commands variables for velocity and effort in the HandleLayer class are not initialzed.
https://github.com/ros-industrial/ros_canopen/blob/melodic-devel/canopen_motor_node/include/canopen_motor_node/handle_layer.h#L89

I think they should be initialized to zero to avoid bad init with non zero cmd.

@mathias-luedtke
Copy link
Member

In this case the value should be managed by hardware_interface::JointHandle. And if the JointHandle is not active, it will be overwritten anyway.

Any fixed value for the commands (especially cmd_pos_) is wrong, but It is okay to set it to 0 to just make any static code analyzer happy :)

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

No branches or pull requests

2 participants