We propose two feasibility constraints to be included in a Single Rigid Body Dynamics-based trajectory optimizer in order to obtain robust motions for quadruped robots in challenging terrain. The former finds an approximate relationship between joint-torque limits and admissible contact forces without requiring the knowledge of the joints' configuration. The latter proposes a model of the leg to guarantee the avoidance of the collision with the environment. Such constraints have been included in a nonlinear non-convex optimization problem. We validate the feasibility of the trajectories both in simulation and on the HyQ robot, including experiments with non flat terrain.