Unless your grandparents have legal custody of you, no, they cannot consent to your emancipation.
Not all states will emancipate a minor. In the states that do, you need to be able to show that you are able to completely support yourself. That does not mean paying your car insurance, cell phone bill, buying your own clothes and the occasional meal; it means that you are also paying your own rent, utilities, all your food, transportation, health insurance, etc etc etc.
Notwithstanding all of that, if you are truly "almost 18" the likelihood is that you will BE eighteen before an emancipation petition could be heard.
If its that bad with your parents do you think your parents would consent to you just living at grams ? if the parents wont let you move to grams and gram will have you then be prepared and the day you turn 18 leave there wont be a single thing they can do legally to prevent it, Been there did it the day I turned 18 , had it all set up , a friend came over and in no time at all was packed loaded and gone , I had even pre packed a few things into bags and a few small boxes ( this was decades ago and I still think it was the best thing I ever did for my self)