- Home /
How to control unity model from publish a numerical value on ROS
From Unity, I can able to control the infant model assigning numerical values to each joint. Since now I can able to communicate between Unity and ROS how can I
publish a numerical value on ROS
read this value on Unity and use it to control the infant model?
Answer by Captain_Pineapple · Mar 21 at 07:50 PM
this appeared to be an intresting unknown topic at first but somehow it makes me wonder if you have tried to ask google before compiling your post:
There is even a Unity page on this here: https://resources.unity.com/unitenow/onlinesessions/simulating-robots-with-ros-and-unity
As there is plenty of resources on this topic available please try to post a question which is a bit more specific if you still have issues.
Hello Captain_Pineapple, First of all, thanks for your quick response, I have searched it on google and I cannot able to figure it out since I can only able to find basic stuff like integrating ROS with unity. I have given bones to my infant model in blender and I wrote code to control it in unity. Then I have integrated unity with ROS using a TCP connection. The thing is I wonder how to publish the numerical values for joints in ROS to control it in unity?
Apologies from my side, i apparently misread your original post and thought that you were searching for a way to integrate ROS with Unity.
I guess the best way to approach this issue would be to take a look at what formats are actually available on both ends. Like how can you serve rotations? What format do you have them in? Best here would be quaternions.
On Unity-Side you can just write a script where you set a new (local) rotation to your bones transform. That is all there is to it. Since a rotation is always a quaternion in Unity a quaternion would be best here. If needs be you can try to use euler angles, but that can lead to janky results in some cases.
Your answer
