is drawing human shaped robots haram in 2D,well robots don't have a soul and muslims can draw things without a soul,i don't know if it is halal but if it is not,can we draw a human body shaped robot with a non human head(es.camera head,tv head)
Depends, if the robot depicts humans or not. But from your question it seems that the robot is humanoid, meaning it depicts humans. In the following hadiths:
Ibn 'Abbas (May Allah be pleased with them) said: I heard the Messenger of Allah (ﷺ) saying, "Every painter will go to Hell, and for every portrait he has made, there will be appointed one who will chastise him in the Hell." Ibn 'Abbas said: If you have to do it, draw pictures of trees and other inanimate things. (https://sunnah.com/riyadussalihin:1680)
In the previous hadith:
'Aishah (May Allah be pleased with her) said: The Messenger of Allah (ﷺ) visited me after returning from a journey, and I had a shelf with a thin cloth curtain hanging over it and on which there were portraits. When he saw it, the colour of his face changed (because of anger) and he said, "O 'Aishah! the most grievous torment from Allah on the Day of Resurrection will be for those who imitate (Allah) in the act of His creation." 'Aishah said: We tore it into pieces and made a cushion or two cushions out of that. (https://sunnah.com/riyadussalihin:1679)
From these hadiths it is obvious that drawing the pictures of animate living things is a sin. So if the robot resembles humans or any other animate living thing, then it is a sin to draw it. Based on what you said to replace the head with a non-human head, then it could still be considered impermissible if the rest of the body resembled a human being.
Abu Hurairah (May Allah be pleased with him) said: The Messenger of Allah (ﷺ) said, "The Almighty Allah said: 'Who is more an oppressor than him who goes to create like My creation? Let him make an ant or a grain of corn or a grain of barley."' (https://sunnah.com/riyadussalihin:1683)
I am a human, and I might have said something wrong. But this is only from what I had. And Allah knows best.
May Allah grant us knowledge and guide us to the right path, and grant us Jannah and Al-Firdaus. Ameen.