although the upper level rules and regulations for bankruptcy are controlled and structured by the federal government; many of the lower level rules and "exceptions" are controlled by state law, and vary state to state.
As long as your RV is clearly your primary residence, it would likely be exempt, up to a specific value. The amount of that exemption is limited depnding on your age, marital status, and whether ownership is community property or tennants in common. There are also other federal exemptions for different types of assets. these federal & state exemptions define what, how much and up to what value of property, belongings, assets, investments, benefits, etc., that you are entitled to keep outside the bankruptcy proceeding.
check out the California Exemptions list at this web site: Ca Bankruptcy Exemptions