private void Update()
        {
            //Topicで指定された感情のGameObjectを表示
            if (State_change)
            {
                Destroy(target);
                target       = generate_gameobject(current_state, target);
                State_change = false;
            }

            //上で表示したGameObjectをHSRの頭部部分に移動させる
            if (subscribed && target != null)
            {
                torso_tf     = tf.torso_lift_link;
                base_foot_tf = tf.base_footprint;

                position.y = torso_tf.transform.translation.z + 0.21f;
                position.x = -(base_foot_tf.pose.position.y + 0.02f);
                position.z = base_foot_tf.pose.position.x - 0.06f;

                target.transform.localPosition = position;
            }
        }
Пример #2
0
 private void ReceiveMessage(object sender, MessageEventArgs e)
 {
     odometryData      = ((GeometryTransformStamped)e.Message);
     isMessageReceived = true;
 }