Indices and tables¶
User Interface Module¶
Middleman Module¶
The node choose the correct speed for the robot, basing on the user desires and the surrounding obstacles
- Subscribes to:
/scan where the latest laser scans are published
/middleman/control where the commands are published by the user_interface node
/middleman/cmd_vel where the keyboard-given velocities are published
- Publishes to:
- /cmd_vel the new twist
-
scripts.middleman.clbk_laser(msg)[source]¶ Function for defining the closest obstacle in the right, frontal and left regions
Parameters: msg – LaserScan the latest laser scan result published on /scan Returns: None
-
scripts.middleman.commandCallBack(cmd)[source]¶ Function for setting the behaviour of the robot depending on the command received
Parameters: cmd – CommandMessage sent by the user_interface node Returns: None
-
scripts.middleman.desired_speed= {'angular': 0, 'linear': 0}¶ Global vector where the latest desired velocitties are saved
-
scripts.middleman.helper_status= False¶ Global boolean to enable/disable the driving assistant
-
scripts.middleman.keyboard_status= False¶ Global boolean to enable/disable the keyboard-given control commands
-
scripts.middleman.main()[source]¶ This function initializes the ROS node and wait for the messages to be published on the topics in order to process them
-
scripts.middleman.new_vel(vel)[source]¶ Function for updating the desired velocities depending on keyboard-given command
Parameters: vel – Twist sent by the keyboard Returns: None
-
scripts.middleman.pub= <rospy.topics.Publisher object>¶ Global publisher for the velocities