You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I have already set up the pacmod2 ros2-master branch in my system, and I have also changed the settings of CAN and related message format. I found that the message type had been changed so I reset all the information I needed. However, I tested it several times, but it seemed that in most of the tests, the pacmod2 wasn't enabled, only success once. When I checked the results of the ros2 RQT, they seemed connected correctly. So, could you tell me how to write the code correctly?
Hi, I have already set up the pacmod2 ros2-master branch in my system, and I have also changed the settings of CAN and related message format. I found that the message type had been changed so I reset all the information I needed. However, I tested it several times, but it seemed that in most of the tests, the pacmod2 wasn't enabled, only success once. When I checked the results of the ros2 RQT, they seemed connected correctly. So, could you tell me how to write the code correctly?
This is part of our code.
class VehicleController(Node):
def init(self):
super().init('vehicle_controller')
# Subscribers
self.gnss_sub = self.create_subscription(NavSatFix, '/navsatfix', self.gnss_callback, 10)
self.ins_sub = self.create_subscription(INSNavGeod, '/insnavgeod', self.ins_callback, 10)
self.enable_sub = self.create_subscription(Bool, '/pacmod/enabled', self.enable_callback, 10)
self.speed_sub = self.create_subscription(VehicleSpeedRpt, '/pacmod/vehicle_speed_rpt', self.speed_callback, 10)
def main(args=None):
rclpy.init(args=args)
vehicle_controller = VehicleController()
rclpy.spin(vehicle_controller)
vehicle_controller.destroy_node()
rclpy.shutdown()
if name == 'main':
main()
Thank you so much!
The text was updated successfully, but these errors were encountered: