I have the question:

And I am asked to find the tension, T, in the rope.
I have drawn a triangle:

And have tried to use trigonometry to find T. However, the solutions say that T should be 17.8N and I am not sure how this is achieved.
I have the question:

And I am asked to find the tension, T, in the rope.
I have drawn a triangle:

And have tried to use trigonometry to find T. However, the solutions say that T should be 17.8N and I am not sure how this is achieved.
The key is that the bar is attached to the wall at $A$, so it will not slide up or down. So the only thing needed for equilibrium is that the net torque about point $A$ balance to zero.
The torque due to the bar weight is $$ \tau_b = 20 \mbox{ N} \cdot 0.4 \mbox{ m} = 8 \mbox{ N-m} $$
The torque due to the tension of the rope is $$ \tau_r = T_y \cdot 0.7 \mbox{ m} $$ where $T_y$ is the upward component of the force exerted by the rope $$ T_y = T\sin(40^\circ) $$ Solving $$ T\sin(40^\circ) \cdot 0.7 \mbox{ m}= 8 \mbox{ N-m}\\ T = \frac{8}{0.7 \sin(40^\circ)} \frac{\mbox{ N-m}}{\mbox{ m}}\approx 17.78 \mbox{ N} $$
You need to balance the torques on the bar around $A$. The weight of the bar acts at the CG, giving a clockwise torque of ???. The rope has to supply a counterclockwise torque to counteract this.