ROS Joint State with velocity and position control

I have understood in the forum that in ROS JointState, when controlling velocity, I must not send a position command.
What should we do if our robot has multiple PhysicsRovolutes and velocity and position control are mixed?

I thought I needed to create multiple ROS JointStates separately, but it didn’t work.
Also, I thought I needed to create multiple “Articulation Roots”, but I couldn’t do that either.

Hello, was this ever solved?

This problem was solved with the following code in the case of ROS1.
It was a long time ago so I’m not sure. Also, it’s a much older version.

import rospy
import numpy as np
from sensor_msgs.msg import JointState

def function_name():

    rospy.init_node('function_name', anonymous=True)
    pub = rospy.Publisher('joint_command', JointState, queue_size=100)

    r = rospy.Rate(5)

    j_pos = JointState()
    j_vel = JointState()

    j_pos.name = ["pos_name1", "pos_name2", "pos_name3", "pos_name4"]
    j_vel.name = ["vel_name1", "vel_name2"]
    
    j_pos.position = np.array([1.3, 0.2, 1.8, 0.1])
    j_vel.velocity = np.array([20.0, -20.0])

    while not rospy.is_shutdown():
        pub.publish(j_pos)
        pub.publish(j_vel)

        r.sleep()

if __name__ == '__main__' :
    try:
        ros_rr_tire_test()

    except rospy.ROSInterruptException: pass