ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
You should initalise ros node with:
rospy.init_node()
for explanation check here.
So you should have at least something like this:
if __name__ == '__main__':
rospy.init_node('xbox_controller')
try:
loop = asyncio.get_event_loop()
loop.add_reader(xboxc, partial(read_events, xboxc))
loop.run_until_complete(summarize())
except rospy.ROSInterruptException:
pass
But if you use xbox controller with ROS probably you want to use joy package.
2 | No.2 Revision |
You should initalise ros node with:with:
rospy.init_node()
rospy.init_node()
for explanation check here.
So you should have at least something like this:
if __name__ == '__main__':
rospy.init_node('xbox_controller')
try:
loop = asyncio.get_event_loop()
loop.add_reader(xboxc, partial(read_events, xboxc))
loop.run_until_complete(summarize())
except rospy.ROSInterruptException:
pass
But if you use xbox controller with ROS probably you want to use joy package.
3 | No.3 Revision |
You should initalise ros node with:
rospy.init_node()with:
rospy.init_node()
for explanation check here.
So you should have at least write something like this:
if __name__ == '__main__':
rospy.init_node('xbox_controller')
try:
loop = asyncio.get_event_loop()
loop.add_reader(xboxc, partial(read_events, xboxc))
loop.run_until_complete(summarize())
except rospy.ROSInterruptException:
pass
But if you use xbox controller with ROS probably you want to use joy package.