Mark Lawrence has several trilogies that fit into this genre. They're fantasy books but the setting/universe is based on science fiction.
Series that I've read and recommend:
Broken Empire
Holy Sister
Red Queens War
I found them all an enjoyable mix of dark/grim fantasy with a good mix of humor. These series all tend to follow an anti-hero or in Broken Empire's case you could argue it's a villain protagonist given just how unsavory a character Jorg is. Even still I found myself liking and rooting for that bastard.