Full rover simulation now added to Dronecode/PX4
8 hours ago
ROS Hydro Medusa has been release and we are close behind with an alpha release of the TurtleBot Hydro ISO Installer and we are hoping for a beta early next week.
UPDATE: Problem with DNS propagation
adding this to your /etc/hosts should work for now
Scan_msg. At it's initialization, a Scan_msg object creates a publisher,
pub, for twist messages, variable
msgto hold the twist message, variables
sect_3, and 3 dictionaries -
dbgmsg- to hold the angular speed, linear speed, and debug message for each possible instance, respectively.
sect_3each represent a specific part of the field of view of the turtlebot (see image below).
sort()takes in a laserscan message and goes through all the ranges read by the robot. If any of the ranges is less than 0.6 m (an obstacle is detected), it determines which section of the field of view (
sect_3) the obstacle is located in and changes the value of that section to 1.
movement()takes in the values of
sect_3and uses them to determine how to move. To do this, it creates a number with the values of these 3 variables and assigns that number to the variable
sectis then used with the class dictionaries to change the angular and linear velocities of msg to the proper values and display the correct debug message. Finally,
movement()published this modified twist message (see code below).
Finally, thesect = int(str(self.sect_1) + str(self.sect_2) + str(self.sect_3)) self.msg.angular.z = self.ang[sect] self.msg.linear.x = self.fwd[sect] rospy.loginfo(self.dbgmsg[sect]) self.pub.publish(self.msg)
reset_sect()function is run to reset the values of
for_callback()takes in a laserscan message and runs both of the above functions.
listener()function first initializes the node
navigation_sensors, and then creates a subscriber with callback function
call_back()takes a Scan_msg object and passes the laserscan message to the class function
listener()is then run, starting the subscriber, which passes a laserscan message to the
call_back()passes the laserscan message to
sort(), which updates variables
sect_3accordingly, then passes these updated variables to
movement()which uses them to determine where to go, updates the class twist message, and publishes that message. This process repeats for each laserscan message.
All source code available at:Wanderer appears on the far right along with the other apps in App Chooser