Re-scaling output values of a topic
Hello guys! I'm working on a teleop project with a Spacenav joystick for a UR5e robot arm. I've remapped the topic to which the spacenav_node published originally to /twist_controller/command
but the values which the joystick sends are too big for the robot arm to safely use and so the safety is triggered. How do I re-scale the values to more optimal ones? The maximum values which the joystick publishes are ~0.9. How do I scale that range down to -0.04 and 0.04?
I'm thinking of making a separate package which launches in parallel to the spacenav one and which takes the output values and divides them by a constant. Is this a viable solution or is there a simpler method to resolve this issue?
Thanks in advance.
Hi, I'm not an expert, so this is not an answer, but your solution would also be my approach to solve this. A simple subscriber who publishes the scaled date to a new topic. Another approach could be to implement a scaling factor in the spacenav node.