Setting up a Hardware Interface for my Robot

225 views
Skip to first unread message

Houidi mohamed amin

unread,
Mar 14, 2019, 5:01:02 PM3/14/19
to ROS/Orocos Robot Control Special Interest Group
Hi,
I am working on a hardware interface for a differential drive robot,and i wanted to use ros_control's differential drive controller.Alas,i have no other way of getting input from my hardware other than pub sub from a node on a node mcu(tried custom serial protocol but failed at it).
So my question relates to using pub/sub inside the read and write functions,should i just declare the publishers and subscribers inside of the constructor for the hardware interface and then publish and subscribe inside read and write functions,without using ros.spin() since there is already an asynch spinner in the main node,or are there other changes that should be made(like adding ros.spin() somewhere else in the code)?
i have attached my hardware interface code(its based on the slate robotics boiler plate code).
thank you for your time and attention.
retailbot_hardware.h
retailbot_hardware_interface.h
retailbot_hardware_interface.cpp
retailbot_hardware_interface_node.cpp
Reply all
Reply to author
Forward
0 new messages