mirror of
https://github.com/soconnor0919/hristudio.git
synced 2026-05-08 13:58:55 -04:00
feat: add initial seed data migration and form builder components
- Created migration 0001_seed_data.sql to insert minimal seed data for users, accounts, and roles. - Added meta journal for migration tracking. - Implemented FormBuilder component for dynamic form field creation and management. - Developed FormFieldRenderer component to render various types of form fields based on user input. - Introduced constants for trust levels and status configurations. - Defined types for form fields and trial data structures to enhance type safety and clarity.
This commit is contained in:
@@ -464,6 +464,7 @@ export class WizardRosService extends EventEmitter {
|
||||
* Subscribe to robot sensor topics
|
||||
*/
|
||||
private subscribeToRobotTopics(): void {
|
||||
console.log("[WizardROS] Setting up robot topics...");
|
||||
const topics = [
|
||||
{ topic: "/joint_states", type: "sensor_msgs/JointState" },
|
||||
{ topic: "/bumper", type: "naoqi_bridge_msgs/Bumper" },
|
||||
@@ -476,6 +477,11 @@ export class WizardRosService extends EventEmitter {
|
||||
topics.forEach(({ topic, type }) => {
|
||||
this.subscribe(topic, type);
|
||||
});
|
||||
|
||||
this.advertise("/speech", "std_msgs/String");
|
||||
this.advertise("/cmd_vel", "geometry_msgs/Twist");
|
||||
this.advertise("/robot_pose", "geometry_msgs/Pose");
|
||||
this.advertise("/animation", "std_msgs/String");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -492,6 +498,21 @@ export class WizardRosService extends EventEmitter {
|
||||
this.send(message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Advertise a ROS topic (declare the type before publishing)
|
||||
*/
|
||||
private advertise(topic: string, messageType: string): void {
|
||||
console.log(`[WizardROS] Advertising topic ${topic} as ${messageType}`);
|
||||
const message: RosMessage = {
|
||||
op: "advertise",
|
||||
topic,
|
||||
type: messageType,
|
||||
id: `adv_${this.messageId++}`,
|
||||
};
|
||||
|
||||
this.send(message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Publish message to ROS topic
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user