San Francisco 49ers coach Jim Harbaugh issued a warning to his players as they departed for the summer following their mandatory minicamp: Be careful, and stay out of trouble.

The 49ers have had a tumultuous offseason, especially outside linebacker Aldon Smith and cornerback Chris Culliver.

"Beware with whom you associate," Harbaugh said he told his players. "It's very important to know your surroundings. Friend or foe? There always seem to be a foe. Get in football position. See around corners, under doors, and anticipate. But mainly surround yourselves around good people."

Quarterback Colin Kaepernick and wide receiver Quinton Patton and Seattle Seahawks wide receiver Ricardo Lockette were investigated for a potential sexual assault in Miami, but were never charged and there was no evidence of any wrongdoing.

"Since I've really started playing, it's something I've been more aware of, and especially in the past few months, it's something obviously you have to be very aware of," Kaepernick said of the need to be careful of his surroundings.

Aldon Smith is set for sentencing on gun charges on July 25.

"I don't know what's going to happen," Smith said. "I'm going to enjoy my month. I'll work out and stay here."

Follow me on Twitter: @RavensInsider

Aaron Wilson covers the Ravens for The Baltimore Sun