This is very typical behavior for a child of 2 years old. The new baby's arrival will probably create a few more difficulties as well but just take one step at a time.
First of all, your daughter needs to be retrained as to how to fall asleep on her own and stay in the bed. Ask yourself these question: Is she afraid of the dark? Is she experiencing separation anxiety?
Maybe she needs a comforting object to sleep with like a bear or a favorite blanket.
Make sure that she has a consistent bedtime and a routine which may consist of a bedtime story.
Do not reinforce her behavior of waking up, screaming, and throwing up She justs wants attention..REALLY. Do not yell and scream at her. Without talking, just put her back into the bed. Do this as many times as it takes for her to stay in the bed. You or your husband may need to begin by staying in her room until she falls asleep. You may end up falling asleep first though.
Or, if she is staying in the bed when awake...check on her every 5 minutes...then 10...then 20. She will know that you are not far away and that you still care. She must be told that Mommy and Daddy have their bed to sleep in and that she has her big girl bed to sleep in. Maybe even put glow in the dark stars on the ceiling or other stickers on her bed. She must develop an inward desire to want to stay in the bed.
On the other hand, if she seems to be waking up having a nightmare/night terror, then you may want to speak to your child's pediatrician.
Nonetheless, this process of retraining your daughter to return and remain in her bed takes patience and dedication. I would not recommend just giving in and letting her sleep with you and her husband. Some parents advocate co sleeping. That would be your personal decision though.
I hope that this has helped. If so, please ACCEPT so that I may be paid for my efforts. Have a great day. If you do need further assistance, please let me know.